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

@ -111,13 +111,11 @@ export class ProfileDutyEmployeeController extends Controller {
Object.assign(data, { ...body, ...meta });
const history = new ProfileDutyHistory();
history.profileDutyId = data.id;
Object.assign(history, { ...data, id: undefined });
await Promise.all([
this.dutyRepository.save(data),
(history.profileDutyId = data.id),
this.dutyHistoryRepository.save(history),
]);
await this.dutyRepository.save(data);
history.profileDutyId = data.id;
await this.dutyHistoryRepository.save(history);
return new HttpSuccess();
}