aboutsummaryrefslogtreecommitdiff
path: root/src/routes/feeds/activity-notifications
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-05 18:54:05 -0700
committerFuwn <[email protected]>2024-10-05 18:54:05 -0700
commitc3ac57c48fa4d75b002886ac6abd4355c10f448d (patch)
tree7309dfe4bce6515698544fc002b64246342320d6 /src/routes/feeds/activity-notifications
parentrefactor(SequelSpy): move prequel list to component (diff)
downloaddue.moe-c3ac57c48fa4d75b002886ac6abd4355c10f448d.tar.xz
due.moe-c3ac57c48fa4d75b002886ac6abd4355c10f448d.zip
fix(feeds): oauth refresh url
Diffstat (limited to 'src/routes/feeds/activity-notifications')
-rw-r--r--src/routes/feeds/activity-notifications/+server.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/routes/feeds/activity-notifications/+server.ts b/src/routes/feeds/activity-notifications/+server.ts
index d3c12182..354f80a0 100644
--- a/src/routes/feeds/activity-notifications/+server.ts
+++ b/src/routes/feeds/activity-notifications/+server.ts
@@ -1,4 +1,5 @@
import { notifications, type Notification } from '$lib/Data/AniList/notifications';
+import root from '$lib/Utility/root';
const htmlEncode = (input: string) => {
return input.replace(/[\u00A0-\u9999<>&]/g, (i) => '&#' + i.charCodeAt(0) + ';');
@@ -68,9 +69,9 @@ export const GET = async ({ url }) => {
let notification = await notifications(token || '');
if (notification === null) {
- token = (
- await (await fetch(`https://192.168.1.60:5173/api/oauth/refresh?token=${refresh}`)).json()
- )['access_token'];
+ token = (await (await fetch(root(`/api/oauth/refresh?token=${refresh}`))).json())[
+ 'access_token'
+ ];
notification = await notifications(token as string);
}