From ba9762d3918b5e5655c65a88ee9e06f2f94309e6 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 50fbb6563..953a18af0 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(),