mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
OAS: example payload
This commit is contained in:
@@ -31,6 +31,8 @@ pub struct AddLevels {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
// TODO try for non-existent token names
|
||||
|
||||
#[post("/api/v1/mcaptcha/domain/token/levels/add")]
|
||||
pub async fn add_levels(
|
||||
payload: web::Json<AddLevels>,
|
||||
|
||||
@@ -138,7 +138,6 @@ impl ResponseError for ServiceError {
|
||||
ServiceError::ChallengeVerificationFailure => StatusCode::UNAUTHORIZED,
|
||||
ServiceError::CaptchaError(e) => match e {
|
||||
CaptchaError::MailboxError => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
|
||||
_ => StatusCode::BAD_REQUEST,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user