1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-30 07:48:57 +09:00

[API] Improve admin/emoji/add

This commit is contained in:
syuilo 2018-11-04 18:37:12 +09:00
parent 95c89ca6db
commit 299b91edc4
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -27,7 +27,7 @@ export const meta = {
}; };
export default define(meta, (ps) => new Promise(async (res, rej) => { export default define(meta, (ps) => new Promise(async (res, rej) => {
await Emoji.insert({ const emoji = await Emoji.insert({
updatedAt: new Date(), updatedAt: new Date(),
name: ps.name, name: ps.name,
host: null, host: null,
@ -35,5 +35,7 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
url: ps.url url: ps.url
}); });
res(); res({
id: emoji._id
});
})); }));