mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-10-25 17:37:56 +00:00
Merge branch 'waiting-list' into feat/neoleap-integration
This commit is contained in:
@@ -29,17 +29,6 @@ export class CustomerRepository {
|
||||
firstName: body.firstName,
|
||||
lastName: body.lastName,
|
||||
dateOfBirth: body.dateOfBirth,
|
||||
gender: body.gender,
|
||||
countryOfResidence: body.countryOfResidence,
|
||||
nationalId: body.nationalId,
|
||||
nationalIdExpiry: body.nationalIdExpiry,
|
||||
sourceOfIncome: body.sourceOfIncome,
|
||||
profession: body.profession,
|
||||
professionType: body.professionType,
|
||||
isPep: body.isPep,
|
||||
profilePictureId: body.profilePictureId,
|
||||
civilIdFrontId: body.civilIdFrontId,
|
||||
civilIdBackId: body.civilIdBackId,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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