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

@ -222,13 +222,11 @@ export class ProfileFamilyMotherEmployeeTempController extends Controller {
familyMother.lastUpdateFullName = req.user.name;
const history = new ProfileFamilyMotherHistory();
history.profileFamilyMotherId = familyMother.id;
Object.assign(history, { ...familyMother, id: undefined });
await Promise.all([
this.ProfileFamilyMother.save(familyMother),
(history.profileFamilyMotherId = familyMother.id),
this.ProfileFamilyMotherHistory.save(history),
]);
await this.ProfileFamilyMother.save(familyMother);
history.profileFamilyMotherId = familyMother.id;
await this.ProfileFamilyMotherHistory.save(history);
return new HttpSuccess(familyMother.id);
}