diff options
| author | Fuwn <[email protected]> | 2026-03-22 03:45:51 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-22 03:50:07 +0000 |
| commit | a1a747d6b46cc653f1716f6f71cf02284b0f20cd (patch) | |
| tree | 01c0e6f9bcef809efc07f7a1032f49b9d58e8faa /src/routes/feeds/activity-notifications/+server.ts | |
| parent | refactor: extract app origin config (diff) | |
| download | due.moe-a1a747d6b46cc653f1716f6f71cf02284b0f20cd.tar.xz due.moe-a1a747d6b46cc653f1716f6f71cf02284b0f20cd.zip | |
refactor: centralise site origin usage
Diffstat (limited to 'src/routes/feeds/activity-notifications/+server.ts')
| -rw-r--r-- | src/routes/feeds/activity-notifications/+server.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/routes/feeds/activity-notifications/+server.ts b/src/routes/feeds/activity-notifications/+server.ts index e4725a5b..70b24a20 100644 --- a/src/routes/feeds/activity-notifications/+server.ts +++ b/src/routes/feeds/activity-notifications/+server.ts @@ -2,6 +2,7 @@ import { notifications, type Notification, } from "$lib/Data/AniList/notifications"; +import { siteUrl } from "$lib/Utility/appOrigin"; import root from "$lib/Utility/root"; const htmlEncode = (input: string) => { @@ -17,18 +18,18 @@ const render = ( <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" - xmlns:content="http://purl.org/rss/1.0/modules/content/" - xmlns:snf="http://www.smartnews.be/snf" - xmlns:media="http://search.yahoo.com/mrss/"> +xmlns:content="http://purl.org/rss/1.0/modules/content/" +xmlns:snf="http://www.smartnews.be/snf" +xmlns:media="http://search.yahoo.com/mrss/"> <channel> - <atom:link href="https://due.moe/feeds/activity-notifications" rel="self" type="application/rss+xml" /> + <atom:link href="${siteUrl("/feeds/activity-notifications")}" rel="self" type="application/rss+xml" /> <title>AniList Notifications • due.moe</title> - <link>https://due.moe</link> + <link>${siteUrl("/")}</link> <description>Instantly view your AniList notifications via RSS!</description> <pubDate>${new Date().toUTCString()}</pubDate> <lastBuildDate>${new Date().toUTCString()}</lastBuildDate> <language>en-US</language> - <snf:logo><url>https://due.moe/favicon-196x196.png</url></snf:logo> + <snf:logo><url>${siteUrl("/favicon-196x196.png")}</url></snf:logo> ${posts .filter((notification: Notification) => notification.type !== undefined) .map((notification: Notification) => { |