This commit is contained in:
tamaina 2023-01-22 16:07:17 +00:00
parent 226e0c4714
commit d347f0a087
5 changed files with 18 additions and 15 deletions

View file

@ -22,8 +22,10 @@ export class EmojiEntityService {
@bindThis
public async pack(
src: Emoji['id'] | Emoji,
opts: { omitHost?: boolean; omitId?: boolean; withUrl?: boolean; } = {},
opts: { omitHost?: boolean; omitId?: boolean; withUrl?: boolean; } = { omitHost: true, omitId: true, withUrl: true },
): Promise<Packed<'Emoji'>> {
opts = { omitHost: true, omitId: true, withUrl: true, ...opts }
const emoji = typeof src === 'object' ? src : await this.emojisRepository.findOneByOrFail({ id: src });
return {