From c9bf99fa668e166972abc8a656fa8422a8df3bf4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 25 Oct 2019 16:13:37 +0900 Subject: [PATCH] Fix bug --- src/server/api/endpoints/admin/emoji/add.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/api/endpoints/admin/emoji/add.ts b/src/server/api/endpoints/admin/emoji/add.ts index 73339cdc0..5345876da 100644 --- a/src/server/api/endpoints/admin/emoji/add.ts +++ b/src/server/api/endpoints/admin/emoji/add.ts @@ -48,7 +48,10 @@ export const meta = { export default define(meta, async (ps, me) => { const type = await detectUrlMine(ps.url); - const exists = await Emojis.findOne({ name: ps.name }); + const exists = await Emojis.findOne({ + name: ps.name, + host: null + }); if (exists != null) throw new ApiError(meta.errors.emojiAlredyExists);