mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 05:42:27 +00:00
fix: fix issue with customer relationship in creating junior
This commit is contained in:
@ -30,10 +30,13 @@ export class CustomerService {
|
||||
return this.findCustomerById(userId);
|
||||
}
|
||||
|
||||
createJuniorCustomer(guardianId: string, juniorId: string, body: CreateJuniorRequestDto) {
|
||||
async createJuniorCustomer(guardianId: string, juniorId: string, body: CreateJuniorRequestDto) {
|
||||
this.logger.log(`Creating junior customer for user ${juniorId}`);
|
||||
|
||||
return this.customerRepository.createCustomer(juniorId, body, false);
|
||||
await this.customerRepository.createCustomer(juniorId, body, false);
|
||||
|
||||
this.logger.log(`Junior customer created for user ${juniorId} successfully`);
|
||||
return this.customerRepository.findOne({ id: juniorId });
|
||||
}
|
||||
|
||||
async findCustomerById(id: string) {
|
||||
|
Reference in New Issue
Block a user