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:
Abdalhamid Alhamad
2025-11-09 12:25:37 +03:00
parent 12cc88a50e
commit 8b00cda23d

View File

@ -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()