From 28dd05216f8d4807175420f37d71a01f4485e59f Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 30 Oct 2023 17:34:54 +0900 Subject: [PATCH] lint fixes --- packages/backend/src/core/CustomEmojiService.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts index 396e3df701..b9a1181a69 100644 --- a/packages/backend/src/core/CustomEmojiService.ts +++ b/packages/backend/src/core/CustomEmojiService.ts @@ -93,6 +93,7 @@ export class CustomEmojiService implements OnApplicationShutdown { return emoji; } + @bindThis public async add(data: { driveFile: MiDriveFile; @@ -195,6 +196,7 @@ export class CustomEmojiService implements OnApplicationShutdown { }); } } + @bindThis public async updateRequest(id: MiEmojiRequest['id'], data: { driveFile?: MiDriveFile; @@ -224,6 +226,7 @@ export class CustomEmojiService implements OnApplicationShutdown { this.localEmojisCache.refresh(); } + @bindThis public async addAliasesBulk(ids: MiEmoji['id'][], aliases: string[]) { const emojis = await this.emojisRepository.findBy({ @@ -331,12 +334,14 @@ export class CustomEmojiService implements OnApplicationShutdown { }); } } + @bindThis public async deleteRequest(id: MiEmojiRequest['id']) { const emoji = await this.emojiRequestsRepository.findOneByOrFail({ id: id }); await this.emojiRequestsRepository.delete(emoji.id); } + @bindThis public async deleteBulk(ids: MiEmoji['id'][], moderator?: MiUser) { const emojis = await this.emojisRepository.findBy({ @@ -457,6 +462,7 @@ export class CustomEmojiService implements OnApplicationShutdown { public checkDuplicate(name: string): Promise { return this.emojisRepository.exist({ where: { name, host: IsNull() } }); } + @bindThis public checkRequestDuplicate(name: string): Promise { return this.emojiRequestsRepository.exist({ where: { name } }); @@ -471,6 +477,7 @@ export class CustomEmojiService implements OnApplicationShutdown { public getEmojiRequestById(id: string): Promise { return this.emojiRequestsRepository.findOneBy({ id }); } + @bindThis public dispose(): void { this.cache.dispose();