feat: add DCB User Service API - Authentication system with KEYCLOAK - Modular architecture with services for each feature

This commit is contained in:
diallolatoile 2025-12-03 00:29:51 +00:00
parent 572b54bcfa
commit d2a5ffcebb

View File

@ -123,7 +123,11 @@ export class HubUsersService {
return throwError(() => 'Password must be at least 8 characters');
}
if (!createUserDto.merchantConfigId) {
if (createUserDto.role === UserRole.DCB_PARTNER && !createUserDto.merchantConfigId) {
return throwError(() => 'Merchant Config is required and cannot be empty');
}
if (createUserDto.userType === UserType.MERCHANT_PARTNER && !createUserDto.merchantConfigId) {
return throwError(() => 'Merchant Config is required and cannot be empty');
}