mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 00:24:54 +00:00
Update return value in updateJunior method to fetch updated junior details by ID instead of returning the junior object directly.
This commit is contained in:
@ -126,7 +126,7 @@ export class JuniorService {
|
|||||||
setIf(junior, 'relationship', body.relationship);
|
setIf(junior, 'relationship', body.relationship);
|
||||||
await Promise.all([junior.save(), customer.save(), user.save()]);
|
await Promise.all([junior.save(), customer.save(), user.save()]);
|
||||||
this.logger.log(`Junior ${juniorId} updated successfully`);
|
this.logger.log(`Junior ${juniorId} updated successfully`);
|
||||||
return junior;
|
return this.findJuniorById(juniorId, false, guardianId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional()
|
@Transactional()
|
||||||
|
|||||||
Reference in New Issue
Block a user