mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 18:15:39 +00:00
clean up systemgroup interface
This commit is contained in:
@@ -65,11 +65,11 @@ pub async fn get_config(
|
||||
match res.exists {
|
||||
Some(true) => {
|
||||
match data.captcha.get_pow(payload.key.clone()).await {
|
||||
Some(config) => {
|
||||
Ok(Some(config)) => {
|
||||
record_fetch(&payload.key, &data.db).await;
|
||||
Ok(HttpResponse::Ok().json(config))
|
||||
}
|
||||
None => {
|
||||
Ok(None) => {
|
||||
init_mcaptcha(&data, &payload.key).await?;
|
||||
let config = data
|
||||
.captcha
|
||||
@@ -81,6 +81,7 @@ pub async fn get_config(
|
||||
record_fetch(&payload.key, &data.db).await;
|
||||
Ok(HttpResponse::Ok().json(config))
|
||||
}
|
||||
Err(e) => Err(e.into()),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user