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
+13 -4
View File
@@ -4,9 +4,9 @@ use crate::http::error::HTTPError;
use crate::routes::group::dto::{CreateGroupRequest, GroupResponse, UpdateGroupRequest};
use crate::routes::group::mapper;
use axum::{
Json,
extract::{Path, State},
http::StatusCode,
Json,
};
use uuid::Uuid;
@@ -68,7 +68,10 @@ pub async fn get_by_id(
(status = 404, description = "Serveur non trouvé"),
(status = 500, description = "Erreur interne du serveur")
),
tag = "Groups"
tag = "Groups",
security(
("bearerAuth" = [])
)
)]
pub async fn create(
_admin: Superuser,
@@ -104,7 +107,10 @@ pub async fn create(
params(
("id" = Uuid, Path, description = "ID du groupe")
),
tag = "Groups"
tag = "Groups",
security(
("bearerAuth" = [])
)
)]
pub async fn update(
_admin: Superuser,
@@ -138,7 +144,10 @@ pub async fn update(
params(
("id" = Uuid, Path, description = "ID du groupe")
),
tag = "Groups"
tag = "Groups",
security(
("bearerAuth" = [])
)
)]
pub async fn delete(
_admin: Superuser,
+1 -1
View File
@@ -7,7 +7,7 @@ pub fn router() -> Router<AppState> {
Router::new()
.route("/groups", get(handlers::get_all).post(handlers::create))
.route(
"/groups/:id",
"/groups/{id}",
get(handlers::get_by_id)
.put(handlers::update)
.delete(handlers::delete),