parent
15e24b9a61
commit
df32b9d65e
43 changed files with 708 additions and 234 deletions
|
@ -50,7 +50,7 @@ pub async fn register_request(
|
|||
.to_string();
|
||||
|
||||
// check for ip ban
|
||||
if let Ok(_) = data.get_ipban_by_ip(&real_ip).await {
|
||||
if data.get_ipban_by_ip(&real_ip).await.is_ok() {
|
||||
return (None, Json(Error::NotAllowed.into()));
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ pub async fn login_request(
|
|||
.to_string();
|
||||
|
||||
// check for ip ban
|
||||
if let Ok(_) = data.get_ipban_by_ip(&real_ip).await {
|
||||
if data.get_ipban_by_ip(&real_ip).await.is_ok() {
|
||||
return (None, Json(Error::NotAllowed.into()));
|
||||
}
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ pub async fn disable_totp_request(
|
|||
}
|
||||
|
||||
// ...
|
||||
match data.update_user_totp(id, &String::new(), &Vec::new()).await {
|
||||
match data.update_user_totp(id, "", &Vec::new()).await {
|
||||
Ok(()) => Json(ApiReturn {
|
||||
ok: true,
|
||||
message: "TOTP disabled".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue