add dpis controller
This commit is contained in:
parent
497decefe4
commit
4852131651
74 changed files with 606 additions and 336 deletions
|
|
@ -131,11 +131,11 @@ export class ProfileAvatarEmployeeController extends Controller {
|
|||
data.isActive = true;
|
||||
data.avatar = avatar;
|
||||
data.avatarName = fileName;
|
||||
await this.avatarRepository.save(data, {data: req});
|
||||
await this.avatarRepository.save(data, { data: req });
|
||||
setLogDataDiff(req, { before, after: data });
|
||||
profile.avatar = avatar;
|
||||
profile.avatarName = fileName;
|
||||
await this.profileRepository.save(profile, {data: req});
|
||||
await this.profileRepository.save(profile, { data: req });
|
||||
|
||||
return new HttpSuccess({ avatar: avatar, avatarName: fileName });
|
||||
}
|
||||
|
|
@ -153,8 +153,8 @@ export class ProfileAvatarEmployeeController extends Controller {
|
|||
if (!_record) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
}
|
||||
|
||||
await this.avatarRepository.remove(_record, {data: req});
|
||||
|
||||
await this.avatarRepository.remove(_record, { data: req });
|
||||
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue