Fix Atom feed route issue
This commit is contained in:
parent
3914ca25a1
commit
ea58c1f60b
@ -27,9 +27,12 @@ router.get("/:path", async (ctx: ctx) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
router.get("/:user/:kind.atom", 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);
|
await userAtomFeedHandler(ctx);
|
||||||
} else {
|
} else {
|
||||||
ctx.response.status = 404;
|
ctx.response.status = 404;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user