Compare commits

...

2 Commits

Author SHA1 Message Date
victorAnumudu 9684e7fcfa added token and uid to all endpoints 2025-06-26 17:37:11 +01:00
ameye d4eda11477 Merge branch 'products-endpont' of MERMS/MermsPanelReactJS into master 2025-06-25 19:55:14 +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 const products = getProductsData?.data?.data?.products_data // PRODUCTS DATA
console.log('PPP', products)
return ( return (
<> <>
+42 -13
View File
@@ -79,6 +79,8 @@ export const topBar = (reqData) => {
export const recentActions = (reqData) => { export const recentActions = (reqData) => {
let postData = { let postData = {
...reqData, ...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
} }
//return getAuxEnd(`/panel/account/actions`) //return getAuxEnd(`/panel/account/actions`)
return postAuxEnd(`/panel/account/actions`, postData, false) return postAuxEnd(`/panel/account/actions`, postData, false)
@@ -94,9 +96,17 @@ export const productsData = (reqData) => {
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION // FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
export const productsURL = () => { export const productsURL = (reqData) => {
return getAuxEnd(`/panel/account/products/url`) 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 // FUNCTION TO REGISTER USER
@@ -126,9 +136,11 @@ export const completeRegistration = (reqData) => {
// FUNCTION TO SUBSCRIBE // FUNCTION TO SUBSCRIBE
export const subscribe = (reqData) => { export const subscribe = (reqData) => {
let postData = { 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 // FUNCTION TO GET CALENDAR EVENTS
export const getCalendarEvents = () => { export const getCalendarEvents = (reqData) => {
// return getAuxEnd(`/panel/account/calendar`)
let postData = { let postData = {
"a":"b" ...reqData,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
} }
return postAuxEnd(`/panel/account/calendar`, postData, false) return postAuxEnd(`/panel/account/calendar`, 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 } let postData = {
return getAuxEnd(`/panel/myproduct/provision`, 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 // FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
export const contactData = () => { export const contactData = (reqData) => {
return getAuxEnd(`/panel/contacts`) 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) => { export const MyProductData = (productID) => {
const reqData = { product_id : productID} const reqData = { product_id : productID}
//console.log(reqData) let postData = {
return getAuxEnd(`/panel/myproduct/dash`,reqData) ...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)
} }