You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
Rename the payload struct to appease clippy
This commit is contained in:
@ -96,8 +96,10 @@ impl IntoResponse for RouteError {
|
||||
}
|
||||
}
|
||||
|
||||
/// # JSON payload for the `POST /api/admin/v1/users` endpoint
|
||||
#[derive(Deserialize, JsonSchema)]
|
||||
pub struct AddUserParams {
|
||||
#[serde(rename = "AddUserRequest")]
|
||||
pub struct Request {
|
||||
/// The username of the user to add.
|
||||
username: String,
|
||||
|
||||
@ -141,7 +143,7 @@ pub async fn handler(
|
||||
}: CallContext,
|
||||
NoApi(mut rng): NoApi<BoxRng>,
|
||||
State(homeserver): State<BoxHomeserverConnection>,
|
||||
Json(params): Json<AddUserParams>,
|
||||
Json(params): Json<Request>,
|
||||
) -> Result<Json<SingleResponse<User>>, RouteError> {
|
||||
if repo.user().exists(¶ms.username).await? {
|
||||
return Err(RouteError::UserAlreadyExists);
|
||||
|
@ -169,7 +169,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddUserParams"
|
||||
"$ref": "#/components/schemas/AddUserRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -637,7 +637,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"AddUserParams": {
|
||||
"AddUserRequest": {
|
||||
"title": "JSON payload for the `POST /api/admin/v1/users` endpoint",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"username"
|
||||
|
Reference in New Issue
Block a user