summaryrefslogtreecommitdiff
path: root/src/server/web
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-04-26 12:34:41 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-04-26 12:34:41 +0900
commit4b205aee913fdfcb9a58f48c13149301f69ce568 (patch)
treee6433f0fd1e9888e77a4601b768d0749b7acd518 /src/server/web
parentNew Crowdin updates (#7482) (diff)
downloadmisskey-4b205aee913fdfcb9a58f48c13149301f69ce568.tar.gz
misskey-4b205aee913fdfcb9a58f48c13149301f69ce568.tar.bz2
misskey-4b205aee913fdfcb9a58f48c13149301f69ce568.zip
Fix #7480
Diffstat (limited to 'src/server/web')
-rw-r--r--src/server/web/index.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/web/index.ts b/src/server/web/index.ts
index c3b184088b..cc343063af 100644
--- a/src/server/web/index.ts
+++ b/src/server/web/index.ts
@@ -252,7 +252,7 @@ router.get('/users/:user', async ctx => {
});
// Note
-router.get('/notes/:note', async ctx => {
+router.get('/notes/:note', async (ctx, next) => {
const note = await Notes.findOne(ctx.params.note);
if (note) {
@@ -277,11 +277,11 @@ router.get('/notes/:note', async ctx => {
return;
}
- ctx.status = 404;
+ await next();
});
// Page
-router.get('/@:user/pages/:page', async ctx => {
+router.get('/@:user/pages/:page', async (ctx, next) => {
const { username, host } = parseAcct(ctx.params.user);
const user = await Users.findOne({
usernameLower: username.toLowerCase(),
@@ -314,12 +314,12 @@ router.get('/@:user/pages/:page', async ctx => {
return;
}
- ctx.status = 404;
+ await next();
});
// Clip
// TODO: 非publicなclipのハンドリング
-router.get('/clips/:clip', async ctx => {
+router.get('/clips/:clip', async (ctx, next) => {
const clip = await Clips.findOne({
id: ctx.params.clip,
});
@@ -339,11 +339,11 @@ router.get('/clips/:clip', async ctx => {
return;
}
- ctx.status = 404;
+ await next();
});
// Gallery post
-router.get('/gallery/:post', async ctx => {
+router.get('/gallery/:post', async (ctx, next) => {
const post = await GalleryPosts.findOne(ctx.params.post);
if (post) {
@@ -362,11 +362,11 @@ router.get('/gallery/:post', async ctx => {
return;
}
- ctx.status = 404;
+ await next();
});
// Channel
-router.get('/channels/:channel', async ctx => {
+router.get('/channels/:channel', async (ctx, next) => {
const channel = await Channels.findOne({
id: ctx.params.channel,
});
@@ -384,7 +384,7 @@ router.get('/channels/:channel', async ctx => {
return;
}
- ctx.status = 404;
+ await next();
});
//#endregion