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

@ -132,11 +132,11 @@ export class ProfileAvatarEmployeeTempController extends Controller {
data.isActive = true;
data.avatar = avatar;
data.avatarName = fileName;
await this.avatarRepository.save(data, {data: req});
setLogDataDiff( req, {before, after: data});
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 });
}
@ -148,7 +148,7 @@ export class ProfileAvatarEmployeeTempController 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();
}