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:
2026-02-26 10:37:22 +01:00
parent e8c6665a06
commit 8b83702bd2
3 changed files with 20 additions and 8 deletions
+8
View File
@@ -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();
}