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

@ -200,15 +200,12 @@ export class ProfileEducationsController extends Controller {
};
Object.assign(data, { ...body, ...meta });
const history = new ProfileEducationHistory();
history.profileEducationId = data.id;
Object.assign(history, { ...data, id: undefined });
await Promise.all([
this.profileEducationRepo.save(data),
(history.profileEducationId = data.id),
this.profileEducationHistoryRepo.save(history),
]);
await this.profileEducationRepo.save(data);
history.profileEducationId = data.id;
await this.profileEducationHistoryRepo.save(history);
return new HttpSuccess();
}