From c3ac57c48fa4d75b002886ac6abd4355c10f448d Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 5 Oct 2024 18:54:05 -0700 Subject: fix(feeds): oauth refresh url --- src/routes/feeds/activity-notifications/+server.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3