From 95dc76ca19bfd228f905b17fa81e02667079a496 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Feb 2020 23:26:35 +0900 Subject: [PATCH] Fix comments --- src/server/api/endpoints/admin/promo/create.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/server/api/endpoints/admin/promo/create.ts b/src/server/api/endpoints/admin/promo/create.ts index 50fbb6563c..953a18af0b 100644 --- a/src/server/api/endpoints/admin/promo/create.ts +++ b/src/server/api/endpoints/admin/promo/create.ts @@ -35,20 +35,17 @@ export const meta = { }; export default define(meta, async (ps, user) => { - // Get favoritee const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); throw e; }); - // if already favorited const exist = await PromoNotes.findOne(note.id); if (exist != null) { throw new ApiError(meta.errors.alreadyPromoted); } - // Create favorite await PromoNotes.save({ noteId: note.id, createdAt: new Date(),