mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 18:15:39 +00:00
chore: linting
This commit is contained in:
@@ -109,8 +109,8 @@ pub async fn init_mcaptcha(data: &AppData, key: &str) -> ServiceResult<()> {
|
||||
|
||||
for level in levels.iter() {
|
||||
let level = LevelBuilder::default()
|
||||
.visitor_threshold(level.visitor_threshold as u32)
|
||||
.difficulty_factor(level.difficulty_factor as u32)
|
||||
.visitor_threshold(level.visitor_threshold)
|
||||
.difficulty_factor(level.difficulty_factor)
|
||||
.unwrap()
|
||||
.build()
|
||||
.unwrap();
|
||||
@@ -268,11 +268,11 @@ pub mod tests {
|
||||
key: token_key.key.clone(),
|
||||
};
|
||||
|
||||
let url = V1_API_ROUTES.pow.get_config;
|
||||
let _url = V1_API_ROUTES.pow.get_config;
|
||||
let mut prev = 0;
|
||||
for (count, l) in levels.iter().enumerate() {
|
||||
for l in prev..l.visitor_threshold * 2 {
|
||||
let get_config_resp = test::call_service(
|
||||
for _l in prev..l.visitor_threshold * 2 {
|
||||
let _get_config_resp = test::call_service(
|
||||
&app,
|
||||
post_request!(&get_config_payload, V1_API_ROUTES.pow.get_config)
|
||||
.to_request(),
|
||||
|
||||
@@ -59,7 +59,7 @@ impl From<ApiWork> for Work {
|
||||
/// if verification is successful
|
||||
#[my_codegen::post(path = "V1_API_ROUTES.pow.verify_pow()")]
|
||||
pub async fn verify_pow(
|
||||
req: HttpRequest,
|
||||
_req: HttpRequest,
|
||||
payload: web::Json<ApiWork>,
|
||||
data: AppData,
|
||||
) -> ServiceResult<impl Responder> {
|
||||
|
||||
Reference in New Issue
Block a user