เก็บประวัติ 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

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