Merge branch 'develop' into dev
# Conflicts: # src/controllers/ProfileAvatarEmployeeController.ts
This commit is contained in:
commit
217f9f64f9
3 changed files with 7 additions and 6 deletions
|
|
@ -159,13 +159,14 @@ export class ProfileAvatarController extends Controller {
|
|||
"SYS_REGISTRY_OFFICER",
|
||||
_record.profileId,
|
||||
);
|
||||
|
||||
if (_record.isActive) {
|
||||
const profile = await this.profileRepository.findOne({
|
||||
where: { id: _record.profileId },
|
||||
});
|
||||
if (profile) {
|
||||
profile.avatar = '';
|
||||
profile.avatarName = '';
|
||||
profile.avatar = null;
|
||||
profile.avatarName = null;
|
||||
await this.profileRepository.save(profile, { data: req });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,8 +160,8 @@ export class ProfileAvatarEmployeeController extends Controller {
|
|||
where: { id: _record.profileEmployeeId },
|
||||
});
|
||||
if (profile) {
|
||||
profile.avatar = '';
|
||||
profile.avatarName = '';
|
||||
profile.avatar = "";
|
||||
profile.avatarName = "";
|
||||
await this.profileRepository.save(profile, { data: req });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue