add dpis controller

This commit is contained in:
Suphonchai Phoonsawat 2024-10-07 14:53:27 +07:00
parent 497decefe4
commit 4852131651
74 changed files with 606 additions and 336 deletions

View file

@ -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();
}