fix: use modules to better organise teh code

This commit is contained in:
silver 2023-08-06 12:43:50 +01:00
parent 263a5b76e1
commit 158292be05
2 changed files with 186 additions and 178 deletions

View file

@ -1,6 +1,9 @@
use skynet_ldap_backend::{
db_init, get_config,
methods::{account_new::post_new_account, account_update::post_update_ldap},
methods::{
account_new::post::{account, email},
account_update::post_update_ldap,
},
State,
};
@ -21,7 +24,8 @@ async fn main() -> tide::Result<()> {
let mut app = tide::with_state(state);
app.at("/ldap/update").post(post_update_ldap);
app.at("/ldap/new").post(post_new_account);
app.at("/ldap/new/email").post(email::submit);
app.at("/ldap/new/account").post(account::submit);
app.listen(host_port).await?;
Ok(())