diff --git a/src/app/modules/hub-users-management/hub-users.service.ts b/src/app/modules/hub-users-management/hub-users.service.ts index 9d28551..50e178d 100644 --- a/src/app/modules/hub-users-management/hub-users.service.ts +++ b/src/app/modules/hub-users-management/hub-users.service.ts @@ -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'); }