feat(#25): API GET /users/pending - liste comptes en attente
- UserController: endpoint GET /users/pending (rôles SUPER_ADMIN, ADMINISTRATEUR, GESTIONNAIRE) - UserService: findPendingUsers(role?) avec filtre statut EN_ATTENTE - GestionnairesService: retrait date_consentement_photo (non présent dans DTO) Made-with: Cursor
This commit is contained in:
@@ -132,6 +132,14 @@ export class UserService {
|
||||
return this.usersRepository.save(entity);
|
||||
}
|
||||
|
||||
async findPendingUsers(role?: RoleType): Promise<Users[]> {
|
||||
const where: any = { statut: StatutUtilisateurType.EN_ATTENTE };
|
||||
if (role) {
|
||||
where.role = role;
|
||||
}
|
||||
return this.usersRepository.find({ where });
|
||||
}
|
||||
|
||||
async findAll(): Promise<Users[]> {
|
||||
return this.usersRepository.find();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user