moved pow to independent module

This commit is contained in:
realaravinth 2021-04-11 22:57:56 +05:30
parent 29e2bb1c58
commit a3f060350c
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
6 changed files with 10 additions and 10 deletions

View file

@ -18,7 +18,6 @@
pub mod duration;
pub mod levels;
pub mod mcaptcha;
pub mod pow;
pub use super::auth::is_authenticated;

View file

@ -20,6 +20,7 @@ use actix_web::web::ServiceConfig;
pub mod auth;
pub mod mcaptcha;
pub mod meta;
pub mod pow;
pub fn services(cfg: &mut ServiceConfig) {
// meta
@ -53,9 +54,9 @@ pub fn services(cfg: &mut ServiceConfig) {
cfg.service(mcaptcha::duration::get_duration);
// pow
cfg.service(mcaptcha::pow::get_config::get_config);
cfg.service(mcaptcha::pow::verify_pow::verify_pow);
cfg.service(mcaptcha::pow::verify_token::validate_captcha_token);
cfg.service(pow::get_config::get_config);
cfg.service(pow::verify_pow::verify_pow);
cfg.service(pow::verify_token::validate_captcha_token);
}
#[cfg(test)]

View file

@ -19,6 +19,6 @@ pub mod get_config;
pub mod verify_pow;
pub mod verify_token;
pub use super::duration::GetDurationResp;
pub use super::is_authenticated;
pub use super::levels::I32Levels;
pub use super::mcaptcha::duration::GetDurationResp;
pub use super::mcaptcha::is_authenticated;
pub use super::mcaptcha::levels::I32Levels;

View file

@ -46,7 +46,7 @@ mod tests {
use m_captcha::pow::PoWConfig;
use super::*;
use crate::api::v1::mcaptcha::pow::get_config::GetConfigPayload;
use crate::api::v1::pow::get_config::GetConfigPayload;
use crate::api::v1::services as v1_services;
use crate::tests::*;
use crate::*;

View file

@ -51,8 +51,8 @@ mod tests {
use m_captcha::pow::Work;
use super::*;
use crate::api::v1::mcaptcha::pow::get_config::GetConfigPayload;
use crate::api::v1::mcaptcha::pow::verify_pow::ValidationToken;
use crate::api::v1::pow::get_config::GetConfigPayload;
use crate::api::v1::pow::verify_pow::ValidationToken;
use crate::api::v1::services as v1_services;
use crate::tests::*;
use crate::*;