mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 13:49:40 +00:00
fix: fix null assertion in creating junior
This commit is contained in:
@ -60,12 +60,12 @@ export class JuniorService {
|
|||||||
await this.juniorRepository.createJunior(user.id, {
|
await this.juniorRepository.createJunior(user.id, {
|
||||||
guardianId,
|
guardianId,
|
||||||
relationship: body.relationship,
|
relationship: body.relationship,
|
||||||
customerId: childCustomer.id,
|
customerId: childCustomer!.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.logger.debug('Creating card For Child');
|
this.logger.debug('Creating card For Child');
|
||||||
|
|
||||||
await this.cardService.createCardForChild(parentCustomer, childCustomer, body.cardColor, body.cardColor);
|
await this.cardService.createCardForChild(parentCustomer, childCustomer!, body.cardColor, body.cardColor);
|
||||||
this.logger.log(`Junior ${user.id} created successfully`);
|
this.logger.log(`Junior ${user.id} created successfully`);
|
||||||
|
|
||||||
return this.generateToken(user.id);
|
return this.generateToken(user.id);
|
||||||
|
Reference in New Issue
Block a user