From ea58c1f60ba2e4cb7a0c66432508d0328d7655ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 22 Oct 2024 12:48:57 +0200 Subject: [PATCH] Fix Atom feed route issue --- server.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.ts b/server.ts index 69f7a05..e3605eb 100644 --- a/server.ts +++ b/server.ts @@ -27,9 +27,12 @@ router.get("/:path", async (ctx: ctx) => { }); router.get("/:user/:kind.atom", async (ctx: ctx) => { - const { user } = ctx.params; + const { user, kind } = ctx.params; - if (user.startsWith("@") || user.startsWith("~") || kind === "articles") { + if ( + kind === "articles" && + (user.startsWith("@") || user.startsWith("~")) + ) { await userAtomFeedHandler(ctx); } else { ctx.response.status = 404;