added token and uid to all endpoints #32

Merged
ameye merged 1 commits from token-uid-payload into master 2025-06-26 19:03:07 +00:00
2 changed files with 42 additions and 14 deletions
-1
View File
@@ -29,7 +29,6 @@ export default function Products() {
},[])
const products = getProductsData?.data?.data?.products_data // PRODUCTS DATA
console.log('PPP', products)
return (
<>
+42 -13
View File
@@ -79,6 +79,8 @@ export const topBar = (reqData) => {
export const recentActions = (reqData) => {
let postData = {
...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
//return getAuxEnd(`/panel/account/actions`)
return postAuxEnd(`/panel/account/actions`, postData, false)
@@ -94,9 +96,17 @@ export const productsData = (reqData) => {
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
export const productsURL = () => {
return getAuxEnd(`/panel/account/products/url`)
export const productsURL = (reqData) => {
let postData = {
...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
return postAuxEnd(`/panel/account/products/url`, postData, false)
// return getAuxEnd(`/panel/account/products/url`)
}
// FUNCTION TO REGISTER USER
@@ -126,9 +136,11 @@ export const completeRegistration = (reqData) => {
// FUNCTION TO SUBSCRIBE
export const subscribe = (reqData) => {
let postData = {
...reqData
...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
return postAuxEnd('/panel/myproduct/subscription', postData, false)
return postAuxEnd(`/panel/myproduct/subscription`, postData, false)
}
@@ -141,27 +153,44 @@ export const recoverPWD = (reqData) => {
}
// FUNCTION TO GET CALENDAR EVENTS
export const getCalendarEvents = () => {
// return getAuxEnd(`/panel/account/calendar`)
export const getCalendarEvents = (reqData) => {
let postData = {
"a":"b"
...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
return postAuxEnd(`/panel/account/calendar`, postData, false)
}
// FUNCTION TO GET MY PRODUCT PROVISION DATA
export const productProvision = (reqData) => {
const postData = { ...reqData }
return getAuxEnd(`/panel/myproduct/provision`, postData)
let postData = {
...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
return postAuxEnd(`/panel/myproduct/provision`, postData, false)
// return getAuxEnd(`/panel/myproduct/provision`, postData)
}
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
export const contactData = () => {
return getAuxEnd(`/panel/contacts`)
export const contactData = (reqData) => {
let postData = {
...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
return postAuxEnd(`/panel/contacts`, postData, false)
// return getAuxEnd(`/panel/contacts`)
}
export const MyProductData = (productID) => {
const reqData = { product_id : productID}
//console.log(reqData)
return getAuxEnd(`/panel/myproduct/dash`,reqData)
let postData = {
...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
return postAuxEnd(`/panel/myproduct/dash`, postData, false)
// return getAuxEnd(`/panel/myproduct/dash`,reqData)
}