เก็บประวัติ isupload

This commit is contained in:
mamoss 2025-06-12 16:47:33 +07:00
parent d249e94cb5
commit 7eea4cd33c
24 changed files with 146 additions and 135 deletions

View file

@ -178,11 +178,12 @@ export class ProfileHonorEmployeeController extends Controller {
history.createdAt = new Date();
history.lastUpdatedAt = new Date();
await Promise.all([
this.honorRepo.save(record, { data: req }),
setLogDataDiff(req, { before, after: record }),
this.honorHistoryRepo.save(history, { data: req }),
]);
this.honorRepo.save(record, { data: req });
setLogDataDiff(req, { before, after: record });
if (!(Object.keys(body).length === 1 && body.isUpload)) {
this.honorHistoryRepo.save(history, { data: req });
// setLogDataDiff(req, { before, after: history });
}
return new HttpSuccess();
}