add login flow for waiting list demo app

This commit is contained in:
Abdalhamid Alhamad
2025-03-04 14:42:02 +03:00
parent 54ce5b022d
commit 9b5f863577
16 changed files with 184 additions and 21 deletions

View File

@ -98,7 +98,7 @@ export class CustomerService {
throw new BadRequestException('CUSTOMER.ALRADY_EXISTS');
}
await this.validateCivilIdForCustomer(userId, body.civilIdFrontId, body.civilIdBackId);
// await this.validateCivilIdForCustomer(userId, body.civilIdFrontId, body.civilIdBackId);
const customer = await this.customerRepository.createCustomer(userId, body, true);
this.logger.log(`customer created for user ${userId}`);
@ -166,9 +166,12 @@ export class CustomerService {
throw new BadRequestException('CUSTOMER.CIVIL_ID_NOT_CREATED_BY_USER');
}
const customerWithTheSameId = await this.customerRepository.findCustomerByCivilId(civilIdFrontId, civilIdBackId);
const customerWithTheSameCivilId = await this.customerRepository.findCustomerByCivilId(
civilIdFrontId,
civilIdBackId,
);
if (customerWithTheSameId) {
if (customerWithTheSameCivilId) {
this.logger.error(
`Customer with civil id front ${civilIdFrontId} and civil id back ${civilIdBackId} already exists`,
);