init
This commit is contained in:
@@ -70,7 +70,10 @@ pub async fn get_by_id(
|
||||
(status = 400, description = "Données invalides (Serveur ou Catégorie non trouvée)"),
|
||||
(status = 500, description = "Erreur interne du serveur")
|
||||
),
|
||||
tag = "Channels"
|
||||
tag = "Channels",
|
||||
security(
|
||||
("bearerAuth" = [])
|
||||
)
|
||||
)]
|
||||
pub async fn create(
|
||||
_admin: Superuser,
|
||||
@@ -119,7 +122,10 @@ pub async fn create(
|
||||
params(
|
||||
("id" = Uuid, Path, description = "ID du channel")
|
||||
),
|
||||
tag = "Channels"
|
||||
tag = "Channels",
|
||||
security(
|
||||
("bearerAuth" = [])
|
||||
)
|
||||
)]
|
||||
pub async fn update(
|
||||
_admin: Superuser,
|
||||
@@ -173,7 +179,10 @@ pub async fn update(
|
||||
params(
|
||||
("id" = Uuid, Path, description = "ID du channel")
|
||||
),
|
||||
tag = "Channels"
|
||||
tag = "Channels",
|
||||
security(
|
||||
("bearerAuth" = [])
|
||||
)
|
||||
)]
|
||||
pub async fn delete(
|
||||
_admin: Superuser,
|
||||
|
||||
@@ -6,7 +6,7 @@ pub fn router() -> Router<AppState> {
|
||||
Router::new()
|
||||
.route("/channels", get(handlers::get_all).post(handlers::create))
|
||||
.route(
|
||||
"/channels/:id",
|
||||
"/channels/{id}",
|
||||
get(handlers::get_by_id)
|
||||
.put(handlers::update)
|
||||
.delete(handlers::delete),
|
||||
|
||||
Reference in New Issue
Block a user