mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 09:10:14 +00:00
fix(api): use correct json key for errors
This commit is contained in:
parent
91d5ae6dd7
commit
5f08a3ed13
1 changed files with 2 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ pub async fn params(State(ctx): State<ApiContext>, mut req: Request, next: Next)
|
||||||
_ => {
|
_ => {
|
||||||
return json_err(
|
return json_err(
|
||||||
StatusCode::BAD_REQUEST,
|
StatusCode::BAD_REQUEST,
|
||||||
r#"{"error": "400: Bad Request", "code": 0}"#.to_string(),
|
r#"{"message":"400: Bad Request","code": 0}"#.to_string(),
|
||||||
)
|
)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
@ -47,7 +47,7 @@ pub async fn params(State(ctx): State<ApiContext>, mut req: Request, next: Next)
|
||||||
else {
|
else {
|
||||||
return json_err(
|
return json_err(
|
||||||
StatusCode::UNAUTHORIZED,
|
StatusCode::UNAUTHORIZED,
|
||||||
r#"{"error": "401: Missing or invalid Authorization header", "code": 0}"#.to_string(),
|
r#"{"message":"401: Missing or invalid Authorization header","code": 0}"#.to_string(),
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue