no message

This commit is contained in:
kittapath 2024-08-13 20:01:53 +07:00
parent 25b5d58f2a
commit 53787597fd
54 changed files with 219 additions and 332 deletions

View file

@ -136,15 +136,12 @@ export class ProfileDisciplineEmployeeTempController extends Controller {
};
Object.assign(data, { ...body, ...meta });
const history = new ProfileDisciplineHistory();
history.profileDisciplineId = data.id;
Object.assign(history, { ...data, id: undefined });
await Promise.all([
this.disciplineRepository.save(data),
(history.profileDisciplineId = data.id),
this.disciplineHistoryRepository.save(history),
]);
await this.disciplineRepository.save(data);
history.profileDisciplineId = data.id;
await this.disciplineHistoryRepository.save(history);
return new HttpSuccess();
}