fix: type avatar & avatarName, clear value null
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m39s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m39s
This commit is contained in:
parent
74752361be
commit
e92321d360
4 changed files with 12 additions and 8 deletions
|
|
@ -165,8 +165,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 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,15 +57,17 @@ export class Profile extends EntityBase {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "รูปถ่าย",
|
comment: "รูปถ่าย",
|
||||||
default: null,
|
default: null,
|
||||||
|
type: "varchar",
|
||||||
})
|
})
|
||||||
avatar: string ;
|
avatar: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "รูปถ่าย",
|
comment: "รูปถ่าย",
|
||||||
default: null,
|
default: null,
|
||||||
|
type: "varchar",
|
||||||
})
|
})
|
||||||
avatarName: string;
|
avatarName: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
|
||||||
|
|
@ -45,15 +45,17 @@ export class ProfileEmployee extends EntityBase {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "รูปถ่าย",
|
comment: "รูปถ่าย",
|
||||||
default: null,
|
default: null,
|
||||||
|
type: "varchar",
|
||||||
})
|
})
|
||||||
avatar: string;
|
avatar: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "รูปถ่าย",
|
comment: "รูปถ่าย",
|
||||||
default: null,
|
default: null,
|
||||||
|
type: "varchar",
|
||||||
})
|
})
|
||||||
avatarName: string;
|
avatarName: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue