fix emoji

This commit is contained in:
mattyatea 2023-09-24 21:12:25 +09:00
parent 0071cb09a9
commit da147417e9
1 changed files with 0 additions and 14 deletions

View File

@ -71,20 +71,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const driveFile = await this.driveFilesRepository.findOneBy({ id: ps.fileId });
if (driveFile == null) throw new ApiError(meta.errors.noSuchFile);
const duplicationEmoji = await this.emojisRepository.find({
where: {
name: ps.name,
},
});
duplicationEmoji.forEach(
(emoji) => {
if (emoji.name === ps.name) {
throw new ApiError(meta.errors.duplicationEmojiAdd);
}
}
)
const emoji = await this.customEmojiService.add({
driveFile,
name: ps.name,