fix location reload error #30

Merged
ameye merged 1 commits from location-reload into master 2025-06-25 13:08:28 +00:00
3 changed files with 25 additions and 27 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ export default function BearerToken() {
return userToken(fields)
},
onError: (error) => {
location.reload();
console.log(error)
// window.location.reload(true)
},
onSuccess: (res) => {
if(res?.data?.resultCode != '0'){
-1
View File
@@ -10,7 +10,6 @@ export default function TopBar() {
},
onError: (error) => {
console.log(error)
location.reload();
},
onSuccess: (res) => {
if(res?.data?.resultCode != '0'){
+23 -25
View File
@@ -43,7 +43,7 @@ const getAuxEnd = (path, reqData= null) => {
})
}
// FUNCTION TO LOGIN USER IN
// FUNCTION TO AUTHORIZE USER IN
export const userToken = (reqData) => {
let postData = {
...reqData
@@ -67,6 +67,23 @@ export const userInfo = (reqData) => {
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 = {
@@ -76,6 +93,11 @@ export const productData = () => {
return postAuxEnd(`/panel/account/products`, postData, false)
}
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
export const productsURL = () => {
return getAuxEnd(`/panel/account/products/url`)
}
@@ -121,16 +143,6 @@ export const recoverPWD = (reqData) => {
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
export const getCalendarEvents = () => {
// return getAuxEnd(`/panel/account/calendar`)
@@ -140,15 +152,6 @@ export const getCalendarEvents = () => {
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
export const productProvision = (reqData) => {
const postData = { ...reqData }
@@ -160,11 +163,6 @@ export const contactData = () => {
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) => {
const reqData = { product_id : productID}
//console.log(reqData)