fix: Type ProfileAvatar string | null
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m20s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m20s
This commit is contained in:
parent
633ccd4906
commit
109caf7a0d
5 changed files with 12 additions and 20 deletions
|
|
@ -164,8 +164,8 @@ export class ProfileAvatarController extends Controller {
|
||||||
where: { id: _record.profileId },
|
where: { id: _record.profileId },
|
||||||
});
|
});
|
||||||
if (profile) {
|
if (profile) {
|
||||||
profile.avatar = "";
|
profile.avatar = null;
|
||||||
profile.avatarName = "";
|
profile.avatarName = null;
|
||||||
await this.profileRepository.save(profile, { data: req });
|
await this.profileRepository.save(profile, { data: req });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -180,12 +180,4 @@ export class ProfileAvatarController extends Controller {
|
||||||
|
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
// private async deleteFile(avatar: string, avatarName: string) {
|
|
||||||
// const url = process.env.API_URL + `/salary/file/${avatar}/${avatarName}`;
|
|
||||||
// console.log(url);
|
|
||||||
// try {
|
|
||||||
// await http.delete(url);
|
|
||||||
// } catch {}
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -160,8 +160,8 @@ export class ProfileAvatarEmployeeController extends Controller {
|
||||||
where: { id: _record.profileEmployeeId },
|
where: { id: _record.profileEmployeeId },
|
||||||
});
|
});
|
||||||
if (profile) {
|
if (profile) {
|
||||||
profile.avatar = "";
|
profile.avatar = null;
|
||||||
profile.avatarName = "";
|
profile.avatarName = null;
|
||||||
await this.profileRepository.save(profile, { data: req });
|
await this.profileRepository.save(profile, { data: req });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,8 +154,8 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
||||||
where: { id: _record.profileEmployeeId },
|
where: { id: _record.profileEmployeeId },
|
||||||
});
|
});
|
||||||
if (profile) {
|
if (profile) {
|
||||||
profile.avatar = "";
|
profile.avatar = null;
|
||||||
profile.avatarName = "";
|
profile.avatarName = null;
|
||||||
await this.profileRepository.save(profile, { data: req });
|
await this.profileRepository.save(profile, { data: req });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,14 +58,14 @@ export class Profile extends EntityBase {
|
||||||
comment: "รูปถ่าย",
|
comment: "รูปถ่าย",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
avatar: string;
|
avatar: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "รูปถ่าย",
|
comment: "รูปถ่าย",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
avatarName: string;
|
avatarName: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
|
||||||
|
|
@ -46,14 +46,14 @@ export class ProfileEmployee extends EntityBase {
|
||||||
comment: "รูปถ่าย",
|
comment: "รูปถ่าย",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
avatar: string;
|
avatar: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "รูปถ่าย",
|
comment: "รูปถ่าย",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
avatarName: string;
|
avatarName: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
@ -693,13 +693,13 @@ export class ProfileEmployee extends EntityBase {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
privacyCheckin: boolean;
|
privacyCheckin: boolean;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะยืนยัน privacyUser",
|
comment: "สถานะยืนยัน privacyUser",
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
privacyUser: boolean;
|
privacyUser: boolean;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะยืนยัน privacyMgt",
|
comment: "สถานะยืนยัน privacyMgt",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue