@bindu-dashing/dam-solution-v2 5.8.140 → 5.8.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -39,6 +39,7 @@ export const DamConfigProvider = ({ children, config }) => {
|
|
|
39
39
|
subdomain,
|
|
40
40
|
teams: teamIds,
|
|
41
41
|
});
|
|
42
|
+
console.log("Token response:", response === null || response === void 0 ? void 0 : response.data);
|
|
42
43
|
const token = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.access_token;
|
|
43
44
|
const userData = (_d = (_c = response === null || response === void 0 ? void 0 : response.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.user;
|
|
44
45
|
const brandData = (_f = (_e = response === null || response === void 0 ? void 0 : response.data) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.brand;
|
|
@@ -76,17 +77,13 @@ export const DamConfigProvider = ({ children, config }) => {
|
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
79
|
// Get the Teams API base URL (different from MIXDRIVE_API_URL)
|
|
79
|
-
const teamsApiBaseUrl =
|
|
80
|
+
const teamsApiBaseUrl = "https://f5ubolirub.execute-api.ap-southeast-2.amazonaws.com/dev/api/v1";
|
|
80
81
|
const teamsEndpoint = FETCH_TEAMS_LIST.replace(":teamID", teamID);
|
|
81
82
|
const fullUrl = teamsApiBaseUrl + teamsEndpoint;
|
|
82
83
|
console.log("Fetching teams from:", fullUrl);
|
|
83
84
|
console.log("TeamID from token:", teamID);
|
|
84
85
|
// Call the new API endpoint using Teams API base URL
|
|
85
|
-
const response = yield axios.get(fullUrl
|
|
86
|
-
headers: {
|
|
87
|
-
Authorization: `Bearer ${token}`,
|
|
88
|
-
},
|
|
89
|
-
});
|
|
86
|
+
const response = yield axios.get(fullUrl);
|
|
90
87
|
console.log("Teams API response:", response === null || response === void 0 ? void 0 : response.data);
|
|
91
88
|
// Set teams from the API response
|
|
92
89
|
// Assuming the response structure is { data: [...] } or similar
|