@goralys/core 1.4.2 → 1.4.3
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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -414,13 +414,13 @@ var GoralysActionHandler = class {
|
|
|
414
414
|
// src/lib/fetch/fetch.client.ts
|
|
415
415
|
var actionHandler = new GoralysActionHandler();
|
|
416
416
|
async function goralysFetchClient(method, input, payload, requestOptions) {
|
|
417
|
-
const { apiDomain,
|
|
417
|
+
const { apiDomain, getSchoolToken, isNative } = getGoralysClientConfig();
|
|
418
418
|
const res = await fetch(`${apiDomain}/${input}`, {
|
|
419
419
|
credentials: "include",
|
|
420
420
|
method: method === "BREW" ? "POST" : method,
|
|
421
421
|
headers: {
|
|
422
422
|
...method === "BREW" ? { "X-HTTP-Method-Override": method } : {},
|
|
423
|
-
"X-High-School-Token":
|
|
423
|
+
"X-High-School-Token": getSchoolToken(),
|
|
424
424
|
"X-Goralys-Client": isNative ? "mobile" : "desktop"
|
|
425
425
|
},
|
|
426
426
|
body: payload ? payload instanceof FormData ? payload : JSON.stringify(payload) : void 0,
|
|
@@ -454,12 +454,12 @@ async function goralysFetchClient(method, input, payload, requestOptions) {
|
|
|
454
454
|
return res;
|
|
455
455
|
}
|
|
456
456
|
async function fetchCsrfClient(formId) {
|
|
457
|
-
const { apiDomain,
|
|
457
|
+
const { apiDomain, getSchoolToken, isNative } = getGoralysClientConfig();
|
|
458
458
|
const res = await fetch(`${apiDomain}/csrf`, {
|
|
459
459
|
method: "POST",
|
|
460
460
|
headers: {
|
|
461
461
|
"Content-Type": "application/json",
|
|
462
|
-
"X-High-School-Token":
|
|
462
|
+
"X-High-School-Token": getSchoolToken(),
|
|
463
463
|
"X-Goralys-Client": isNative ? "mobile" : "desktop"
|
|
464
464
|
},
|
|
465
465
|
credentials: "include",
|