challenge msg from libmcaptcha

This commit is contained in:
realaravinth 2021-06-09 20:20:03 +05:30
parent fb0d75961c
commit ca8709fd93
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
2 changed files with 2 additions and 8 deletions

2
Cargo.lock generated
View file

@ -303,7 +303,7 @@ dependencies = [
[[package]]
name = "libmcaptcha"
version = "0.1.4"
source = "git+https://github.com/mCaptcha/libmcaptcha?branch=master#05dd9bbbb6efa1d47b87b991096d7b4778a14fe1"
source = "git+https://github.com/mCaptcha/libmcaptcha?branch=master#0ff9cf9cb0a43fd6cea8289dcb8df7e707e90ba1"
dependencies = [
"derive_builder",
"derive_more",

View file

@ -16,6 +16,7 @@
*/
use std::time::Duration;
use libmcaptcha::cache::AddChallenge;
use redis_module::native_types::RedisType;
use redis_module::raw::KeyType;
use redis_module::NextArg;
@ -36,13 +37,6 @@ pub struct Challenge {
duration: u64,
}
#[derive(Serialize, Deserialize)]
pub struct AddChallenge {
difficulty: usize,
duration: u64,
challenge: String,
}
impl Challenge {
pub fn new(duration: u64, difficulty: usize) -> Self {
Self {