Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 29878e3ddf | |||
| 80a40da9df | |||
| 9f7f1b706b | |||
| d878d1d098 | |||
| 3a60d4e12c |
@@ -1,6 +1,6 @@
|
|||||||
SKIP_PREFLIGHT_CHECK=true
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
REACT_APP_NODE_ENV="development"
|
REACT_APP_NODE_ENV="development"
|
||||||
REACT_APP_SOCKET_URL="https://dev-socket.mermsemr.com"
|
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
|
||||||
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
||||||
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
||||||
REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com"
|
REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
SKIP_PREFLIGHT_CHECK=true
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
REACT_APP_NODE_ENV="development"
|
REACT_APP_NODE_ENV="development"
|
||||||
REACT_APP_SOCKET_URL="https://dev-socket.mermsemr.com"
|
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
|
||||||
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
||||||
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
||||||
REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com"
|
REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com"
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ export default function BearerToken() {
|
|||||||
return userToken(fields)
|
return userToken(fields)
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
location.reload();
|
console.log(error)
|
||||||
|
// window.location.reload(true)
|
||||||
},
|
},
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
if(res?.data?.resultCode != '0'){
|
if(res?.data?.resultCode != '0'){
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export default function TopBar() {
|
|||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
location.reload();
|
|
||||||
},
|
},
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
if(res?.data?.resultCode != '0'){
|
if(res?.data?.resultCode != '0'){
|
||||||
|
|||||||
+35
-32
@@ -9,7 +9,8 @@ axios.interceptors.request.use(
|
|||||||
// "Access-Control-Expose-Headers": "Access-Control-Allow-Origin",
|
// "Access-Control-Expose-Headers": "Access-Control-Allow-Origin",
|
||||||
// "Access-Control-Allow-Headers": "Origin, X-API-KEY, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Access-Control-Allow-Headers, Authorization, observe, enctype, Content-Length, X-Csrf-Token",
|
// "Access-Control-Allow-Headers": "Origin, X-API-KEY, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Access-Control-Allow-Headers, Authorization, observe, enctype, Content-Length, X-Csrf-Token",
|
||||||
// "Content-Type": "application/json;charset=UTF-8",
|
// "Content-Type": "application/json;charset=UTF-8",
|
||||||
'Authorization': (localStorage && localStorage.getItem('access_token')) ? `Bearer ${localStorage.getItem('access_token')}` : ''
|
'Authorization': (localStorage && localStorage.getItem('access_token')) ? `Bearer ${localStorage.getItem('access_token')}` : '',
|
||||||
|
// 'uuid': 'dummy'
|
||||||
};
|
};
|
||||||
// config.headers['Authorization'] = `Bearer ${localStorage.getItem('token')}`;
|
// config.headers['Authorization'] = `Bearer ${localStorage.getItem('token')}`;
|
||||||
// config.baseURL = process.env.REACT_APP_MAIN_API
|
// config.baseURL = process.env.REACT_APP_MAIN_API
|
||||||
@@ -42,7 +43,7 @@ const getAuxEnd = (path, reqData= null) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO LOGIN USER IN
|
// FUNCTION TO AUTHORIZE USER IN
|
||||||
export const userToken = (reqData) => {
|
export const userToken = (reqData) => {
|
||||||
let postData = {
|
let postData = {
|
||||||
...reqData
|
...reqData
|
||||||
@@ -63,7 +64,38 @@ export const userInfo = (reqData) => {
|
|||||||
let postData = {
|
let postData = {
|
||||||
...reqData
|
...reqData
|
||||||
}
|
}
|
||||||
return postAuxEnd('/panel/Account', postData, false)
|
return postAuxEnd('/panel/account', postData, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DASHBOARD TOP BAR SECTION
|
||||||
|
export const topBar = (reqData) => {
|
||||||
|
let postData = {
|
||||||
|
...reqData,
|
||||||
|
}
|
||||||
|
return postAuxEnd(`/panel/account/bar`, postData, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DASHBOARD RECENT ACTIONS SECTION
|
||||||
|
export const recentActions = (reqData) => {
|
||||||
|
let postData = {
|
||||||
|
...reqData,
|
||||||
|
}
|
||||||
|
//return getAuxEnd(`/panel/account/actions`)
|
||||||
|
return postAuxEnd(`/panel/account/actions`, postData, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
||||||
|
export const productData = () => {
|
||||||
|
let postData = {
|
||||||
|
"token":"b",
|
||||||
|
"uid": 'h'
|
||||||
|
}
|
||||||
|
return postAuxEnd(`/panel/account/products`, postData, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
|
||||||
|
export const productsURL = () => {
|
||||||
|
return getAuxEnd(`/panel/account/products/url`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -111,16 +143,6 @@ export const recoverPWD = (reqData) => {
|
|||||||
return postAuxEnd('/panel/auth/reset', postData, false)
|
return postAuxEnd('/panel/auth/reset', postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD TOP BAR SECTION
|
|
||||||
export const topBar = (reqData) => {
|
|
||||||
let postData = {
|
|
||||||
...reqData,
|
|
||||||
// "token":"there-will-be-token",
|
|
||||||
// "uid": "there-will-be-uid"
|
|
||||||
}
|
|
||||||
return postAuxEnd(`/panel/account-bar`, postData, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION TO GET CALENDAR EVENTS
|
// FUNCTION TO GET CALENDAR EVENTS
|
||||||
export const getCalendarEvents = () => {
|
export const getCalendarEvents = () => {
|
||||||
// return getAuxEnd(`/panel/account/calendar`)
|
// return getAuxEnd(`/panel/account/calendar`)
|
||||||
@@ -130,36 +152,17 @@ export const getCalendarEvents = () => {
|
|||||||
return postAuxEnd(`/panel/account/calendar`, postData, false)
|
return postAuxEnd(`/panel/account/calendar`, postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD RECENT ACTIONS SECTION
|
|
||||||
export const recentActions = () => {
|
|
||||||
//return getAuxEnd(`/panel/account/actions`)
|
|
||||||
let postData = {
|
|
||||||
"a":"b"
|
|
||||||
}
|
|
||||||
return postAuxEnd(`/panel/account/actions`, postData, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION TO GET MY PRODUCT PROVISION DATA
|
// FUNCTION TO GET MY PRODUCT PROVISION DATA
|
||||||
export const productProvision = (reqData) => {
|
export const productProvision = (reqData) => {
|
||||||
const postData = { ...reqData }
|
const postData = { ...reqData }
|
||||||
return getAuxEnd(`/panel/myproduct/provision`, postData)
|
return getAuxEnd(`/panel/myproduct/provision`, postData)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
|
||||||
export const productData = () => {
|
|
||||||
return getAuxEnd(`/panel/account/products`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
||||||
export const contactData = () => {
|
export const contactData = () => {
|
||||||
return getAuxEnd(`/panel/contacts`)
|
return getAuxEnd(`/panel/contacts`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
|
|
||||||
export const productsURL = () => {
|
|
||||||
return getAuxEnd(`/panel/account/products/url`)
|
|
||||||
}
|
|
||||||
|
|
||||||
export const MyProductData = (productID) => {
|
export const MyProductData = (productID) => {
|
||||||
const reqData = { product_id : productID}
|
const reqData = { product_id : productID}
|
||||||
//console.log(reqData)
|
//console.log(reqData)
|
||||||
|
|||||||
Reference in New Issue
Block a user