From 70bb365cd157f6f623dcc56667d9ebbc4410181f Mon Sep 17 00:00:00 2001 From: FineArchs Date: Fri, 11 Oct 2024 14:55:57 +0900 Subject: [PATCH] " -> ' --- packages/backend/src/core/CustomEmojiService.ts | 8 ++++---- .../src/server/api/endpoints/admin/emoji/update.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts index 078351327f..cb23a2f8c0 100644 --- a/packages/backend/src/core/CustomEmojiService.ts +++ b/packages/backend/src/core/CustomEmojiService.ts @@ -115,20 +115,20 @@ export class CustomEmojiService implements OnApplicationShutdown { roleIdsThatCanBeUsedThisEmojiAsReaction?: MiRole['id'][]; }, moderator?: MiUser): Promise< void - | "NO_SUCH_EMOJI" - | "SAME_NAME_EMOJI_EXISTS" + | 'NO_SUCH_EMOJI' + | 'SAME_NAME_EMOJI_EXISTS' > { const emoji = data.id ? await this.getEmojiById(data.id) : await this.getEmojiByName(data.name!); - if (emoji === null) return "NO_SUCH_EMOJI"; + if (emoji === null) return 'NO_SUCH_EMOJI'; const id = emoji.id; // IDと絵文字名が両方指定されている場合は絵文字名の変更を行うため重複チェックが必要 const doNameUpdate = data.id && data.name && (data.name !== emoji.name); if (doNameUpdate) { const isDuplicate = await this.checkDuplicate(data.name!); - if (isDuplicate) return "SAME_NAME_EMOJI_EXISTS"; + if (isDuplicate) return 'SAME_NAME_EMOJI_EXISTS'; } await this.emojisRepository.update(emoji.id, { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index 2e6a662be2..95ee1d0810 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -96,8 +96,8 @@ export default class extends Endpoint { // eslint- switch (error) { case undefined: return; - case "NO_SUCH_EMOJI": throw new ApiError(meta.errors.noSuchEmoji); - case "SAME_NAME_EMOJI_EXISTS": throw new ApiError(meta.errors.sameNameEmojiExists); + case 'NO_SUCH_EMOJI': throw new ApiError(meta.errors.noSuchEmoji); + case 'SAME_NAME_EMOJI_EXISTS': throw new ApiError(meta.errors.sameNameEmojiExists); } }); }