Updated deps.
Health and root endpoint
This commit is contained in:
@ -39,6 +39,7 @@ where
|
||||
let auth_layer = AuthManagerLayerBuilder::new(user_service.clone(), session_layer).build();
|
||||
AppBuilder::new()
|
||||
.routes([
|
||||
routes::router(),
|
||||
routes::hotel::router()
|
||||
.with_state(pool.clone())
|
||||
.login_required::<Pool>(),
|
||||
|
@ -1,6 +1,25 @@
|
||||
use lib::{router, routes};
|
||||
|
||||
pub mod auth;
|
||||
pub mod hotel;
|
||||
pub mod reservation;
|
||||
pub mod room;
|
||||
pub mod task;
|
||||
pub mod user;
|
||||
|
||||
router! {
|
||||
"/",
|
||||
routes! {
|
||||
get "/" => home,
|
||||
get "/health" => health,
|
||||
}
|
||||
}
|
||||
|
||||
async fn home() -> &'static str {
|
||||
"Hello, World!" // TODO inform the user about the API
|
||||
}
|
||||
|
||||
/// Health check endpoint
|
||||
async fn health() -> &'static str {
|
||||
"OK"
|
||||
}
|
||||
|
Reference in New Issue
Block a user