WIP(ApNoteService.ts): asをなくす

エラーメッセージを考える
This commit is contained in:
okayurisotto 2023-07-02 14:11:27 +09:00
parent a24e709a06
commit f688d7a933

View file

@ -360,10 +360,9 @@ export class ApNoteService {
updatedAt: new Date(),
});
return await this.emojisRepository.findOneBy({
host,
name,
}) as Emoji;
const emoji = await this.emojisRepository.findOneBy({ host, name });
if (emoji == null) throw new Error(''); // TODO
return emoji;
}
return exists;