mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
moved pow to independent module
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
pub mod duration;
|
pub mod duration;
|
||||||
pub mod levels;
|
pub mod levels;
|
||||||
pub mod mcaptcha;
|
pub mod mcaptcha;
|
||||||
pub mod pow;
|
|
||||||
|
|
||||||
pub use super::auth::is_authenticated;
|
pub use super::auth::is_authenticated;
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ use actix_web::web::ServiceConfig;
|
|||||||
pub mod auth;
|
pub mod auth;
|
||||||
pub mod mcaptcha;
|
pub mod mcaptcha;
|
||||||
pub mod meta;
|
pub mod meta;
|
||||||
|
pub mod pow;
|
||||||
|
|
||||||
pub fn services(cfg: &mut ServiceConfig) {
|
pub fn services(cfg: &mut ServiceConfig) {
|
||||||
// meta
|
// meta
|
||||||
@@ -53,9 +54,9 @@ pub fn services(cfg: &mut ServiceConfig) {
|
|||||||
cfg.service(mcaptcha::duration::get_duration);
|
cfg.service(mcaptcha::duration::get_duration);
|
||||||
|
|
||||||
// pow
|
// pow
|
||||||
cfg.service(mcaptcha::pow::get_config::get_config);
|
cfg.service(pow::get_config::get_config);
|
||||||
cfg.service(mcaptcha::pow::verify_pow::verify_pow);
|
cfg.service(pow::verify_pow::verify_pow);
|
||||||
cfg.service(mcaptcha::pow::verify_token::validate_captcha_token);
|
cfg.service(pow::verify_token::validate_captcha_token);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ pub mod get_config;
|
|||||||
pub mod verify_pow;
|
pub mod verify_pow;
|
||||||
pub mod verify_token;
|
pub mod verify_token;
|
||||||
|
|
||||||
pub use super::duration::GetDurationResp;
|
pub use super::mcaptcha::duration::GetDurationResp;
|
||||||
pub use super::is_authenticated;
|
pub use super::mcaptcha::is_authenticated;
|
||||||
pub use super::levels::I32Levels;
|
pub use super::mcaptcha::levels::I32Levels;
|
||||||
@@ -46,7 +46,7 @@ mod tests {
|
|||||||
use m_captcha::pow::PoWConfig;
|
use m_captcha::pow::PoWConfig;
|
||||||
|
|
||||||
use super::*;
|
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::api::v1::services as v1_services;
|
||||||
use crate::tests::*;
|
use crate::tests::*;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
@@ -51,8 +51,8 @@ mod tests {
|
|||||||
use m_captcha::pow::Work;
|
use m_captcha::pow::Work;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::api::v1::mcaptcha::pow::get_config::GetConfigPayload;
|
use crate::api::v1::pow::get_config::GetConfigPayload;
|
||||||
use crate::api::v1::mcaptcha::pow::verify_pow::ValidationToken;
|
use crate::api::v1::pow::verify_pow::ValidationToken;
|
||||||
use crate::api::v1::services as v1_services;
|
use crate::api::v1::services as v1_services;
|
||||||
use crate::tests::*;
|
use crate::tests::*;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
Reference in New Issue
Block a user