diff options
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/feeds/activity-notifications/+server.ts | 7 |
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); } |