From 299b91edc40d06cae8a1742175ffacd63bf6dcc3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 4 Nov 2018 18:37:12 +0900 Subject: [PATCH] [API] Improve admin/emoji/add --- src/server/api/endpoints/admin/emoji/add.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/api/endpoints/admin/emoji/add.ts b/src/server/api/endpoints/admin/emoji/add.ts index 533dd75af9..07149fce65 100644 --- a/src/server/api/endpoints/admin/emoji/add.ts +++ b/src/server/api/endpoints/admin/emoji/add.ts @@ -27,7 +27,7 @@ export const meta = { }; export default define(meta, (ps) => new Promise(async (res, rej) => { - await Emoji.insert({ + const emoji = await Emoji.insert({ updatedAt: new Date(), name: ps.name, host: null, @@ -35,5 +35,7 @@ export default define(meta, (ps) => new Promise(async (res, rej) => { url: ps.url }); - res(); + res({ + id: emoji._id + }); }));