mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-12 02:25:41 +00:00
migrated auth, account and meta to use const routes
This commit is contained in:
@@ -29,10 +29,9 @@ pub mod routes {
|
||||
pub update: &'static str,
|
||||
pub get: &'static str,
|
||||
}
|
||||
|
||||
impl Default for Duration {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
impl Duration {
|
||||
pub const fn new() -> Duration {
|
||||
Duration {
|
||||
update: "/api/v1/mcaptcha/domain/token/duration/update",
|
||||
get: "/api/v1/mcaptcha/domain/token/duration/get",
|
||||
}
|
||||
|
||||
@@ -34,13 +34,13 @@ pub mod routes {
|
||||
pub get: &'static str,
|
||||
}
|
||||
|
||||
impl Default for Levels {
|
||||
fn default() -> Self {
|
||||
impl Levels {
|
||||
pub const fn new() -> Levels {
|
||||
let add = "/api/v1/mcaptcha/levels/add";
|
||||
let update = "/api/v1/mcaptcha/levels/update";
|
||||
let delete = "/api/v1/mcaptcha/levels/delete";
|
||||
let get = "/api/v1/mcaptcha/levels/get";
|
||||
Self {
|
||||
Levels {
|
||||
add,
|
||||
get,
|
||||
update,
|
||||
|
||||
@@ -33,9 +33,9 @@ pub mod routes {
|
||||
pub update_key: &'static str,
|
||||
}
|
||||
|
||||
impl Default for MCaptcha {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
impl MCaptcha {
|
||||
pub const fn new() -> MCaptcha {
|
||||
MCaptcha {
|
||||
add: "/api/v1/mcaptcha/add",
|
||||
update_key: "/api/v1/mcaptcha/update/key",
|
||||
get_token: "/api/v1/mcaptcha/get",
|
||||
|
||||
Reference in New Issue
Block a user