This commit is contained in:
2026-05-17 13:33:10 +02:00
parent b2cefb7d66
commit fed75d4820
54 changed files with 3845 additions and 51 deletions
+20 -5
View File
@@ -20,7 +20,10 @@ use uuid::Uuid;
(status = 403, description = "Interdit"),
(status = 500, description = "Erreur interne du serveur")
),
tag = "Users"
tag = "Users",
security(
("bearerAuth" = [])
)
)]
pub async fn get_all(
_admin: Superuser,
@@ -49,7 +52,10 @@ pub async fn get_all(
params(
("id" = Uuid, Path, description = "ID de l'utilisateur")
),
tag = "Users"
tag = "Users",
security(
("bearerAuth" = [])
)
)]
pub async fn get_by_id(
_admin: Superuser,
@@ -78,7 +84,10 @@ pub async fn get_by_id(
(status = 403, description = "Interdit"),
(status = 500, description = "Erreur interne du serveur")
),
tag = "Users"
tag = "Users",
security(
("bearerAuth" = [])
)
)]
pub async fn create(
_admin: Superuser,
@@ -120,7 +129,10 @@ pub async fn create(
params(
("id" = Uuid, Path, description = "ID de l'utilisateur")
),
tag = "Users"
tag = "Users",
security(
("bearerAuth" = [])
)
)]
pub async fn update(
_admin: Superuser,
@@ -167,7 +179,10 @@ pub async fn update(
params(
("id" = Uuid, Path, description = "ID de l'utilisateur")
),
tag = "Users"
tag = "Users",
security(
("bearerAuth" = [])
)
)]
pub async fn delete(
_admin: Superuser,
+1 -1
View File
@@ -7,7 +7,7 @@ pub fn router() -> Router<AppState> {
Router::new()
.route("/users", get(handlers::get_all).post(handlers::create))
.route(
"/users/:id",
"/users/{id}",
get(handlers::get_by_id)
.put(handlers::update)
.delete(handlers::delete),