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,