forked from jmug/stoatchat
chore: update routes to use utoipa
This commit is contained in:
@@ -3,10 +3,16 @@ use revolt_result::Result;
|
||||
|
||||
use rocket::State;
|
||||
|
||||
/// # Acknowledge Policy Changes
|
||||
/// Acknowledge Policy Changes
|
||||
///
|
||||
/// Accept/acknowledge changes to platform policy.
|
||||
#[utoipa::path(tag = "Policy")]
|
||||
#[utoipa::path(
|
||||
tag = "Policy",
|
||||
security(("Session-Token" = []), ("Bot-Token" = [])),
|
||||
responses(
|
||||
(status = 204),
|
||||
),
|
||||
)]
|
||||
#[post("/acknowledge")]
|
||||
pub async fn acknowledge_policy_changes(db: &State<Database>, user: User) -> Result<()> {
|
||||
db.acknowledge_policy_changes(&user.id).await
|
||||
|
||||
Reference in New Issue
Block a user