new laptop setup
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
use actix_web::web;
|
||||
use actix_web::web::ServiceConfig;
|
||||
|
||||
use super::path::Path;
|
||||
|
||||
mod login;
|
||||
mod logout;
|
||||
|
||||
pub fn auth_factory(app: &mut ServiceConfig) {
|
||||
let base_path: Path = Path {
|
||||
prefix: String::from("/auth"),
|
||||
backend: true,
|
||||
};
|
||||
|
||||
app.route(
|
||||
&base_path.define(String::from("/login")),
|
||||
web::post().to(login::login),
|
||||
);
|
||||
app.route(
|
||||
&base_path.define(String::from("/logout")),
|
||||
web::post().to(logout::logout),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user