@appcorp/fusion-storybook 0.2.25 → 0.2.26
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.
|
@@ -18,7 +18,7 @@ const POLL_TIMEOUT_MS = 300000;
|
|
|
18
18
|
const handleGetAllRecords = async (schoolId) => {
|
|
19
19
|
const response = await fetch(`${TEACHER_API_ROUTES.UNIT}?pageLimit=1000¤tPage=1&schoolId=${schoolId}`, {
|
|
20
20
|
headers: {
|
|
21
|
-
"x-api-token": process.env.
|
|
21
|
+
"x-api-token": process.env.NEXT_PUBLIC_API_TOKEN,
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
const result = await response.json();
|
|
@@ -31,7 +31,7 @@ async function submitBulkJob(csvData, method, signal) {
|
|
|
31
31
|
const schoolId = ((_a = workspace === null || workspace === void 0 ? void 0 : workspace.school) === null || _a === void 0 ? void 0 : _a.id) || "";
|
|
32
32
|
if (!schoolId)
|
|
33
33
|
throw new Error("School ID not found");
|
|
34
|
-
const apiKey = process.env.
|
|
34
|
+
const apiKey = process.env.NEXT_PUBLIC_API_TOKEN;
|
|
35
35
|
if (!apiKey)
|
|
36
36
|
throw new Error("API key not configured");
|
|
37
37
|
const res = await fetch(TEACHER_API_ROUTES.BULK, {
|
|
@@ -62,7 +62,7 @@ async function pollBulkJob(jobId, signal, onProgress) {
|
|
|
62
62
|
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
63
63
|
if (signal.aborted)
|
|
64
64
|
throw new Error("Polling cancelled");
|
|
65
|
-
const apiKey = process.env.
|
|
65
|
+
const apiKey = process.env.NEXT_PUBLIC_API_TOKEN;
|
|
66
66
|
if (!apiKey)
|
|
67
67
|
throw new Error("API key not configured");
|
|
68
68
|
const res = await fetch(TEACHER_API_ROUTES.BULK_STATUS(jobId), {
|