-
-
Notifications
You must be signed in to change notification settings - Fork 771
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Innei <i@innei.in>
- Loading branch information
Showing
3 changed files
with
1,264 additions
and
1,012 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
diff --git a/client/_utils.js b/client/_utils.js | ||
index de4e3c4eedfaffa561ff7ea80f109cbf3bb807e5..ea42a4893fbb67159663d21bd606f44eece0ebe1 100644 | ||
index 25bd573915c9bd9251ed6ce241889e0d6f13ba55..13a0976921eee51ecaab15ec062ba3ce6e8b47ce 100644 | ||
--- a/client/_utils.js | ||
+++ b/client/_utils.js | ||
@@ -57,6 +57,8 @@ function _fetchData() { | ||
options.method = "POST"; | ||
} | ||
|
||
+ options.credentials = "include"; | ||
+ | ||
_context.next = 7; | ||
return fetch(url, options); | ||
|
||
diff --git a/src/client/_utils.ts b/src/client/_utils.ts | ||
index 1f3819e0db80661af241d9110aabe3e2f2520a1b..edf96089152f317a5eeb982acac3a3586f0ac3a9 100644 | ||
--- a/src/client/_utils.ts | ||
+++ b/src/client/_utils.ts | ||
@@ -54,7 +54,7 @@ export async function fetchData<T = any>( | ||
if (!res.ok) throw data | ||
return Object.keys(data).length > 0 ? data : null // Return null if data empty | ||
} catch (error) { | ||
- logger.error("CLIENT_FETCH_ERROR", { error: error as Error, url }) | ||
+ console.error("CLIENT_FETCH_ERROR", { error: error as Error, url }) | ||
return null | ||
} | ||
} | ||
@@ -46,6 +46,7 @@ function _fetchData() { | ||
options.method = "POST"; | ||
} | ||
_context.next = 7; | ||
+ options.credentials = "include"; | ||
return fetch(url, options); | ||
case 7: | ||
res = _context.sent; | ||
@@ -63,7 +64,7 @@ function _fetchData() { | ||
case 16: | ||
_context.prev = 16; | ||
_context.t0 = _context["catch"](2); | ||
- logger.error("CLIENT_FETCH_ERROR", { | ||
+ console.error("CLIENT_FETCH_ERROR", { | ||
error: _context.t0, | ||
url: url | ||
}); |
Oops, something went wrong.