aboutsummaryrefslogtreecommitdiff
path: root/src/routes/feeds/activity-notifications
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/feeds/activity-notifications')
-rw-r--r--src/routes/feeds/activity-notifications/+server.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/routes/feeds/activity-notifications/+server.ts b/src/routes/feeds/activity-notifications/+server.ts
index 70b24a20..64ba3fdc 100644
--- a/src/routes/feeds/activity-notifications/+server.ts
+++ b/src/routes/feeds/activity-notifications/+server.ts
@@ -1,15 +1,12 @@
import {
- notifications,
type Notification,
+ notifications,
} from "$lib/Data/AniList/notifications";
import { siteUrl } from "$lib/Utility/appOrigin";
import root from "$lib/Utility/root";
const htmlEncode = (input: string) => {
- return input.replace(
- /[\u00A0-\u9999<>&]/g,
- (i) => "&#" + i.charCodeAt(0) + ";",
- );
+ return input.replace(/[\u00A0-\u9999<>&]/g, (i) => `&#${i.charCodeAt(0)};`);
};
const render = (
@@ -82,7 +79,7 @@ export const GET = async ({ url }) => {
if (notification === null) {
token = (
await (await fetch(root(`/api/oauth/refresh?token=${refresh}`))).json()
- )["access_token"];
+ ).access_token;
notification = await notifications(token as string);
}