diff --git a/src/component/authorization/BearerToken.jsx b/src/component/authorization/BearerToken.jsx index 6d1ac85..85ed117 100644 --- a/src/component/authorization/BearerToken.jsx +++ b/src/component/authorization/BearerToken.jsx @@ -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'){ diff --git a/src/component/home/TopBar.jsx b/src/component/home/TopBar.jsx index f8a6c35..5a350f0 100644 --- a/src/component/home/TopBar.jsx +++ b/src/component/home/TopBar.jsx @@ -10,7 +10,6 @@ export default function TopBar() { }, onError: (error) => { console.log(error) - location.reload(); }, onSuccess: (res) => { if(res?.data?.resultCode != '0'){ diff --git a/src/services/services.js b/src/services/services.js index 6514f8c..f2a3dfe 100644 --- a/src/services/services.js +++ b/src/services/services.js @@ -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)