rocket 5.0 & diesel 2.1
This commit is contained in:
@@ -122,12 +122,12 @@ impl<'r> FromRequest<'r> for CurrentUser {
|
||||
}
|
||||
} {
|
||||
if BannedUsers::has(&rconn, &user.namehash).await.unwrap() {
|
||||
Outcome::Failure((Status::Forbidden, ()))
|
||||
Outcome::Error((Status::Forbidden, ()))
|
||||
} else {
|
||||
Outcome::Success(user)
|
||||
}
|
||||
} else {
|
||||
Outcome::Failure((Status::Unauthorized, ()))
|
||||
Outcome::Error((Status::Unauthorized, ()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user