Skip to content

Commit

Permalink
Task #0000:commented dev hardcoded url
Browse files Browse the repository at this point in the history
  • Loading branch information
ManojNathIC committed Aug 6, 2024
1 parent 9a15059 commit db2b4ab
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
14 changes: 7 additions & 7 deletions packages/nulp_elite/src/configs/urlConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,15 @@
"UPDATE_CHAT": "/directConnect/update-chat",
"GET_BLOCK_USER_LIST": "/directConnect/get-block-user-list"
},
"EVENT": {
"CUSTOM_EVENT": {
"READ": "/event/v4/read",
"SEARCH": "/action/composite/v3/search",
"GET_LIST": "/event/list",
"GET_COUNT": "/event/event_count",
"TOP_TRENDING_EVENT": "/event/get_top_trending",
"REGISTER": "/event/registration",
"REPORT": "/event/reports",
"CUSTOM_ENROLL_LIST": "/event/enrollment-list"
"GET_LIST": "/custom_event/list",
"GET_COUNT": "/custom_event/event_count",
"TOP_TRENDING_EVENT": "/custom_event/get_top_trending",
"REGISTER": "/custom_event/registration",
"REPORT": "/custom_event/reports",
"CUSTOM_ENROLL_LIST": "/custom_event/enrollment-list"
},
"POLL": {
"CREATE": "/polls/create",
Expand Down
24 changes: 12 additions & 12 deletions packages/nulp_elite/src/pages/events/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ const Dashboard = () => {
const eventReports = async (event_id) => {
try {
const params = new URLSearchParams({ event_id: event_id });
const url = `${urlConfig.URLS.EVENT.REPORT}?${params.toString()}`;
// const url = `https://devnulp.niua.org/event/reports?${params.toString()}`;
const url = `${urlConfig.URLS.CUSTOM_EVENT.REPORT}?${params.toString()}`;
// const url = `https://devnulp.niua.org/custom_event/reports?${params.toString()}`;

const response = await fetch(url, {
method: "GET",
Expand Down Expand Up @@ -183,8 +183,8 @@ const Dashboard = () => {
};

try {
const url = `${urlConfig.URLS.EVENT.GET_LIST}`;
// const url = `https://devnulp.niua.org/event/list`;
const url = `${urlConfig.URLS.CUSTOM_EVENT.GET_LIST}`;
// const url = `https://devnulp.niua.org/custom_event/list`;
const response = await fetch(url, {
method: "POST",
headers: {
Expand Down Expand Up @@ -223,8 +223,8 @@ const Dashboard = () => {
};

try {
const url = `${urlConfig.URLS.EVENT.GET_LIST}`;
// const url = `https://devnulp.niua.org/event/list`;
const url = `${urlConfig.URLS.CUSTOM_EVENT.GET_LIST}`;
// const url = `https://devnulp.niua.org/custom_event/list`;
const response = await fetch(url, {
method: "POST",
headers: {
Expand Down Expand Up @@ -269,8 +269,8 @@ const Dashboard = () => {
};

try {
const url = `${urlConfig.URLS.EVENT.GET_COUNT}`;
// const url = `https://devnulp.niua.org/event/event_count`;
const url = `${urlConfig.URLS.CUSTOM_EVENT.GET_COUNT}`;
// const url = `https://devnulp.niua.org/custom_event/event_count`;

const response = await fetch(url, {
method: "POST",
Expand Down Expand Up @@ -303,9 +303,9 @@ const Dashboard = () => {
}

const url = `${
urlConfig.URLS.EVENT.TOP_TRENDING_EVENT
urlConfig.URLS.CUSTOM_EVENT.TOP_TRENDING_EVENT
}?${params.toString()}`;
// const url = `https://devnulp.niua.org/event/get_top_trending?${params.toString()}`;
// const url = `https://devnulp.niua.org/custom_event/get_top_trending?${params.toString()}`;

const response = await fetch(url, {
method: "GET",
Expand Down Expand Up @@ -341,9 +341,9 @@ const Dashboard = () => {
}

const url = `${
urlConfig.URLS.EVENT.TOP_TRENDING_EVENT
urlConfig.URLS.CUSTOM_EVENT.TOP_TRENDING_EVENT
}?${params.toString()}`;
// const url = `https://devnulp.niua.org/event/get_top_trending?${params.toString()}`;
// const url = `https://devnulp.niua.org/custom_event/get_top_trending?${params.toString()}`;
const response = await fetch(url, {
method: "GET",
headers: {
Expand Down
12 changes: 6 additions & 6 deletions packages/nulp_elite/src/pages/events/eventDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const EventDetails = () => {
fetchUserData();
const fetchData = async () => {
try {
const url = `${urlConfig.URLS.PUBLIC_PREFIX}${urlConfig.URLS.EVENT.READ}/${eventId}`;
const url = `${urlConfig.URLS.PUBLIC_PREFIX}${urlConfig.URLS.CUSTOM_EVENT.READ}/${eventId}`;
const response = await fetch(url, {
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -261,7 +261,7 @@ const EventDetails = () => {
"Content-Type": "application/json",
};
try {
// const url = `${urlConfig.URLS.LEARNER_PREFIX}${urlConfig.URLS.EVENT.CUSTOM_ENROLL_LIST}`;
// const url = `${urlConfig.URLS.LEARNER_PREFIX}${urlConfig.URLS.CUSTOM_EVENT.CUSTOM_ENROLL_LIST}`;
const url = `https://devnulp.niua.org/event/enrollment-list`;
const response = await getAllContents(url, data, headers);
console.log("My data ---", response.data.result.event);
Expand Down Expand Up @@ -528,12 +528,12 @@ const EventDetails = () => {
};

const registerEvent = async (formData) => {
const url = `${urlConfig.URLS.EVENT.REGISTER}`;
const url = `${urlConfig.URLS.CUSTOM_EVENT.REGISTER}`;
console.log("------------------url", url);
console.log("------------------urlConfig.URLS.EVENT", urlConfig.URLS.EVENT);
console.log("------------------urlConfig.URLS.EVENT", urlConfig.URLS.CUSTOM_EVENT);
console.log(
"------------------urlConfig.URLS.EVENT.REGISTER",
urlConfig.URLS.EVENT.REGISTER
"------------------urlConfig.URLS.CUSTOM_EVENT.REGISTER",
urlConfig.URLS.CUSTOM_EVENT.REGISTER
);

const RequestBody = {
Expand Down

0 comments on commit db2b4ab

Please sign in to comment.