chore: update routes to use utoipa

This commit is contained in:
Zomatree
2025-11-17 22:13:07 +00:00
parent ac60b2c795
commit 43c94b68b0
110 changed files with 891 additions and 231 deletions

View File

@@ -9,10 +9,16 @@ use revolt_result::{create_error, Result};
use rocket::{serde::json::Json, State};
use validator::Validate;
/// # Ban User
/// Ban User
///
/// Ban a user by their id.
#[utoipa::path(tag = "Server Members")]
#[utoipa::path(
tag = "Server Members",
security(("Session-Token" = []), ("Bot-Token" = [])),
responses(
(status = 200, body = v0::ServerBan),
),
)]
#[put("/<server>/bans/<target>", data = "<data>")]
pub async fn ban(
db: &State<Database>,