2022-04-24 18:52:17 +00:00
|
|
|
use axum::routing::get;
|
|
|
|
|
2022-04-18 12:13:15 +00:00
|
|
|
pub mod login;
|
2022-04-19 11:05:47 +00:00
|
|
|
pub mod register;
|
2022-04-23 21:48:20 +00:00
|
|
|
pub mod whoami;
|
2022-04-18 12:13:15 +00:00
|
|
|
|
|
|
|
pub fn app() -> axum::Router {
|
|
|
|
use axum::routing::post;
|
|
|
|
|
2022-04-19 11:05:47 +00:00
|
|
|
axum::Router::new()
|
|
|
|
.route("/login", post(login::handle))
|
|
|
|
.route("/register", post(register::handle))
|
2022-04-24 18:52:17 +00:00
|
|
|
.route("/whoami", get(whoami::handle))
|
2022-04-18 12:13:15 +00:00
|
|
|
}
|