mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 13:49:40 +00:00
feat: handle new registration flow
This commit is contained in:
@ -89,13 +89,13 @@ export class CustomerService {
|
||||
}
|
||||
|
||||
@Transactional()
|
||||
async createGuardianCustomer(userId: string, body: CreateCustomerRequestDto) {
|
||||
async createGuardianCustomer(userId: string, body: Partial<CreateCustomerRequestDto>) {
|
||||
this.logger.log(`Creating guardian customer for user ${userId}`);
|
||||
const existingCustomer = await this.customerRepository.findOne({ id: userId });
|
||||
|
||||
if (existingCustomer) {
|
||||
this.logger.error(`Customer ${userId} already exists`);
|
||||
throw new BadRequestException('CUSTOMER.ALRADY_EXISTS');
|
||||
throw new BadRequestException('CUSTOMER.ALREADY_EXISTS');
|
||||
}
|
||||
|
||||
// await this.validateCivilIdForCustomer(userId, body.civilIdFrontId, body.civilIdBackId);
|
||||
|
Reference in New Issue
Block a user