diff options
| author | Fuwn <[email protected]> | 2024-10-05 18:54:05 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-05 18:54:05 -0700 |
| commit | c3ac57c48fa4d75b002886ac6abd4355c10f448d (patch) | |
| tree | 7309dfe4bce6515698544fc002b64246342320d6 /src/routes/feeds/activity-notifications | |
| parent | refactor(SequelSpy): move prequel list to component (diff) | |
| download | due.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.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); } |