forked from mirror/misskey
cleanup(ApPersonService.ts
): 不必要な三項演算子を削除
This commit is contained in:
parent
09f67204b1
commit
eb0607ec8b
@ -347,12 +347,12 @@ export class ApPersonService implements OnModuleInit {
|
|||||||
return this.apImageService.resolveImage(user, img).catch(() => null);
|
return this.apImageService.resolveImage(user, img).catch(() => null);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const avatarId = avatar ? avatar.id : null;
|
const avatarId = avatar?.id ?? null;
|
||||||
const bannerId = banner ? banner.id : null;
|
const bannerId = banner?.id ?? null;
|
||||||
const avatarUrl = avatar ? this.driveFileEntityService.getPublicUrl(avatar, 'avatar') : null;
|
const avatarUrl = avatar ? this.driveFileEntityService.getPublicUrl(avatar, 'avatar') : null;
|
||||||
const bannerUrl = banner ? this.driveFileEntityService.getPublicUrl(banner) : null;
|
const bannerUrl = banner ? this.driveFileEntityService.getPublicUrl(banner) : null;
|
||||||
const avatarBlurhash = avatar ? avatar.blurhash : null;
|
const avatarBlurhash = avatar?.blurhash ?? null;
|
||||||
const bannerBlurhash = banner ? banner.blurhash : null;
|
const bannerBlurhash = banner?.blurhash ?? null;
|
||||||
|
|
||||||
await this.usersRepository.update(user.id, {
|
await this.usersRepository.update(user.id, {
|
||||||
avatarId,
|
avatarId,
|
||||||
|
Loading…
Reference in New Issue
Block a user