From f1ab918ecd3bfe9ac5ceee7e79586645844d9623 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 20 Jul 2019 03:20:06 +0900 Subject: Fix question (#5197) --- src/server/activitypub.ts | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/server') diff --git a/src/server/activitypub.ts b/src/server/activitypub.ts index 12fccbfa7d..0f1373d78f 100644 --- a/src/server/activitypub.ts +++ b/src/server/activitypub.ts @@ -109,28 +109,6 @@ router.get('/notes/:note/activity', async ctx => { setResponseType(ctx); }); -// question -router.get('/questions/:question', async (ctx, next) => { - const pollNote = await Notes.findOne({ - id: ctx.params.question, - userHost: null, - visibility: In(['public', 'home']), - localOnly: false, - hasPoll: true - }); - - if (pollNote == null) { - ctx.status = 404; - return; - } - - const user = await Users.findOne(pollNote.userId).then(ensure); - const poll = await Polls.findOne({ noteId: pollNote.id }).then(ensure); - - ctx.body = renderActivity(await renderQuestion(user as ILocalUser, pollNote, poll)); - setResponseType(ctx); -}); - // outbox router.get('/users/:user/outbox', Outbox); -- cgit v1.2.3-freya