From 6ad9a9677a88556f8e380b2e04359e2a4f9d75f6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 7 May 2023 11:31:32 +0900 Subject: [PATCH] fix test --- packages/backend/src/core/entities/UserEntityService.ts | 2 +- packages/backend/src/server/api/endpoints/admin/show-user.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index b822c5dce4..4e2f0317dd 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -412,7 +412,7 @@ export class UserEntityService implements OnModuleInit { userId: meId, targetUserId: user.id, }).then(row => row?.memo ?? null), - moderationNote: iAmModerator ? profile!.moderationNote : null, + moderationNote: iAmModerator ? (profile!.moderationNote ?? '') : null, } : {}), ...(opts.detail && isMe ? { diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index 9d19efbbcf..42229c8f23 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -80,7 +80,7 @@ export default class extends Endpoint { isSilenced: isSilenced, isSuspended: user.isSuspended, lastActiveDate: user.lastActiveDate, - moderationNote: profile.moderationNote, + moderationNote: profile.moderationNote ?? '', signins, policies: await this.roleService.getUserPolicies(user.id), roles: await this.roleEntityService.packMany(roles, me),