From 79372e803cb1431531ada81f7e3117b9aa47e8df Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 30 Jan 2026 17:05:16 +0700 Subject: [PATCH] fix: avatar : string --- src/controllers/ProfileAvatarController.ts | 4 ++-- src/controllers/ProfileAvatarEmployeeController.ts | 4 ++-- src/controllers/ProfileAvatarEmployeeTempController.ts | 4 ++-- src/entities/Profile.ts | 4 ++-- src/entities/ProfileEmployee.ts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/controllers/ProfileAvatarController.ts b/src/controllers/ProfileAvatarController.ts index 717f65f5..85bc4adc 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 = null; - profile.avatarName = null; + profile.avatar = ''; + profile.avatarName = ''; await this.profileRepository.save(profile, { data: req }); } } diff --git a/src/controllers/ProfileAvatarEmployeeController.ts b/src/controllers/ProfileAvatarEmployeeController.ts index ac6c2ff0..e36b699a 100644 --- a/src/controllers/ProfileAvatarEmployeeController.ts +++ b/src/controllers/ProfileAvatarEmployeeController.ts @@ -160,8 +160,8 @@ export class ProfileAvatarEmployeeController extends Controller { where: { id: _record.profileEmployeeId }, }); if (profile) { - profile.avatar = null; - profile.avatarName = null; + profile.avatar = ''; + profile.avatarName = ''; await this.profileRepository.save(profile, { data: req }); } } diff --git a/src/controllers/ProfileAvatarEmployeeTempController.ts b/src/controllers/ProfileAvatarEmployeeTempController.ts index da4a109f..e26bd53f 100644 --- a/src/controllers/ProfileAvatarEmployeeTempController.ts +++ b/src/controllers/ProfileAvatarEmployeeTempController.ts @@ -154,8 +154,8 @@ export class ProfileAvatarEmployeeTempController extends Controller { where: { id: _record.profileEmployeeId }, }); 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 aae4273f..994fcfbe 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, diff --git a/src/entities/ProfileEmployee.ts b/src/entities/ProfileEmployee.ts index 6db7190f..e358304d 100644 --- a/src/entities/ProfileEmployee.ts +++ b/src/entities/ProfileEmployee.ts @@ -46,14 +46,14 @@ export class ProfileEmployee extends EntityBase { comment: "รูปถ่าย", default: null, }) - avatar: string | null; + avatar: string; @Column({ nullable: true, comment: "รูปถ่าย", default: null, }) - avatarName: string | null; + avatarName: string; @Column({ nullable: true,