diff --git a/src/v1/mod.rs b/src/v1/mod.rs index 118d0ca..4c0fb1b 100644 --- a/src/v1/mod.rs +++ b/src/v1/mod.rs @@ -48,9 +48,7 @@ async fn verify_user_auth(data: &web::Data, auth_token: &str, user_tok // User Endpoints #[utoipa::path( - params( - schemas::GetUserParams - ), + request_body = GetUserParams, responses( (status = 200, description = "OK", body = User), (status = 403, description = "Unauthorized"), @@ -60,7 +58,7 @@ async fn verify_user_auth(data: &web::Data, auth_token: &str, user_tok ("api_key" = []) ), )] -#[get("/api/v1/user")] +#[post("/api/v1/user")] pub(crate) async fn get_user( data: web::Data, params: web::Json, @@ -118,7 +116,7 @@ pub(crate) async fn get_user( (status = 500, description = "Internal Server Error") ), )] -#[post("/api/v1/user")] +#[post("/api/v1/user/create")] pub(crate) async fn create_user( data: web::Data, ) -> impl Responder { @@ -320,7 +318,7 @@ pub(crate) async fn update_user( } #[utoipa::path( - request_body = schemas::DeleteUserParams, + request_body = DeleteUserParams, responses( (status = 200, description = "OK"), (status = 403, description = "Unauthorized"), diff --git a/src/v1/schemas.rs b/src/v1/schemas.rs index 8fea931..81c23c3 100644 --- a/src/v1/schemas.rs +++ b/src/v1/schemas.rs @@ -32,7 +32,7 @@ pub struct User { pub permissions: HashMap, } -#[derive(Serialize, Deserialize, ToSchema, Debug, IntoParams)] +#[derive(Serialize, Deserialize, ToSchema, Debug)] pub struct GetUserParams { #[schema(example = "abcdef")] pub user_token: String,