From 365b5eaa701d39f512721223a6f545b9d178dfc9 Mon Sep 17 00:00:00 2001 From: mattyatea Date: Fri, 15 Sep 2023 19:18:44 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=81=AA=E3=82=93=E3=81=8B=E3=82=A2?= =?UTF-8?q?=E3=83=9B=E3=81=BF=E3=81=9F=E3=81=84=E3=81=AA=E3=83=90=E3=82=B0?= =?UTF-8?q?fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/server/api/endpoints/admin/emoji/update.ts | 10 ---------- 1 file changed, 10 deletions(-) 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 0dc061e790..dfe5266382 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -69,8 +69,6 @@ export default class extends Endpoint { // eslint- constructor( @Inject(DI.driveFilesRepository) private driveFilesRepository: DriveFilesRepository, - @Inject(DI.emojisRepository) - private emojisRepository: EmojisRepository, private customEmojiService: CustomEmojiService, ) { super(meta, paramDef, async (ps, me) => { @@ -80,15 +78,7 @@ export default class extends Endpoint { // eslint- driveFile = await this.driveFilesRepository.findOneBy({ id: ps.fileId }); if (driveFile == null) throw new ApiError(meta.errors.noSuchFile); } - const existEmoji = await this.emojisRepository.exist({ - where: { - name: ps.name, - }, - }); - if (existEmoji) { - throw new ApiError(meta.errors.duplicationEmojiAdd); - } await this.customEmojiService.update(ps.id, { driveFile, name: ps.name,