From 74752361be00b4a49a350e7d945435288c94d918 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 30 Jan 2026 18:22:07 +0700 Subject: [PATCH] fix: avatar : string --- 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 73374070..099cdcb1 100644 --- a/src/controllers/ProfileAvatarController.ts +++ b/src/controllers/ProfileAvatarController.ts @@ -165,8 +165,8 @@ export class ProfileAvatarController extends Controller { where: { id: _record.profileId }, }); if (profile) { - profile.avatar = null; - profile.avatarName = null; + profile.avatar = ""; + profile.avatarName = ""; await this.profileRepository.save(profile, { data: req }); } } diff --git a/src/entities/Profile.ts b/src/entities/Profile.ts index b1e99e9f..f5bdd6ce 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 | null; + avatar: string ; @Column({ nullable: true, comment: "รูปถ่าย", default: null, }) - avatarName?: string | null; + avatarName: string; @Column({ nullable: true,