From 84fb85ef3ae0bfd07ef84f8ff523516d486ff036 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 30 Jan 2026 17:22:25 +0700 Subject: [PATCH] fix: test entity avatar --- src/controllers/ProfileAvatarController.ts | 4 ++-- src/entities/Profile.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/ProfileAvatarController.ts b/src/controllers/ProfileAvatarController.ts index d9a6e1f9..717f65f5 100644 --- a/src/controllers/ProfileAvatarController.ts +++ b/src/controllers/ProfileAvatarController.ts @@ -164,8 +164,8 @@ export class ProfileAvatarController extends Controller { where: { id: _record.profileId }, }); if (profile) { - profile.avatar = ""; - profile.avatarName = ""; + profile.avatar = null; + profile.avatarName = null; await this.profileRepository.save(profile, { data: req }); } } diff --git a/src/entities/Profile.ts b/src/entities/Profile.ts index 994fcfbe..aae4273f 100644 --- a/src/entities/Profile.ts +++ b/src/entities/Profile.ts @@ -58,14 +58,14 @@ export class Profile extends EntityBase { comment: "รูปถ่าย", default: null, }) - avatar: string; + avatar: string | null; @Column({ nullable: true, comment: "รูปถ่าย", default: null, }) - avatarName: string; + avatarName: string | null; @Column({ nullable: true,