fix: better strucurter in other modules
This commit is contained in:
parent
3165f67e4c
commit
9d28d89eee
3 changed files with 334 additions and 338 deletions
|
@ -1,6 +1,6 @@
|
|||
use skynet_ldap_backend::{
|
||||
db_init, get_config,
|
||||
methods::{account_new, account_recover, account_update::post_update_ldap},
|
||||
methods::{account_new, account_recover, account_update},
|
||||
State,
|
||||
};
|
||||
|
||||
|
@ -20,9 +20,9 @@ async fn main() -> tide::Result<()> {
|
|||
|
||||
let mut app = tide::with_state(state);
|
||||
|
||||
app.at("/ldap/update").post(post_update_ldap);
|
||||
app.at("/ldap/new/email").post(account_new::post::email::submit);
|
||||
app.at("/ldap/new/account").post(account_new::post::account::submit);
|
||||
app.at("/ldap/update").post(account_update::submit);
|
||||
app.at("/ldap/new/email").post(account_new::email::submit);
|
||||
app.at("/ldap/new/account").post(account_new::account::submit);
|
||||
app.at("/ldap/recover/password").post(account_recover::password::reset);
|
||||
app.at("/ldap/recover/password/auth").post(account_recover::password::auth);
|
||||
|
||||
|
|
|
@ -13,9 +13,6 @@ use tide::{
|
|||
Request,
|
||||
};
|
||||
|
||||
pub mod post {
|
||||
use super::*;
|
||||
|
||||
pub mod email {
|
||||
use super::*;
|
||||
|
||||
|
@ -455,4 +452,3 @@ pub mod post {
|
|||
.await
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ pub struct ModifyResult {
|
|||
}
|
||||
|
||||
/// Handles updating a single field with the users own password
|
||||
pub async fn post_update_ldap(mut req: Request<State>) -> tide::Result {
|
||||
pub async fn submit(mut req: Request<State>) -> tide::Result {
|
||||
let LdapUpdate {
|
||||
user,
|
||||
pass,
|
||||
|
|
Loading…
Reference in a new issue