ada endpoint used
This commit is contained in:
parent
ab2c1bb677
commit
1494c4f048
3 changed files with 23 additions and 1 deletions
|
@ -30,7 +30,7 @@ use std::net::SocketAddr;
|
|||
use tower_http::services::{ServeDir, ServeFile};
|
||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
|
||||
|
||||
use crate::templates::shift_reports_html;
|
||||
use crate::templates::*;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/templates.rs"));
|
||||
|
||||
|
@ -77,6 +77,7 @@ async fn main() {
|
|||
let app = Router::new()
|
||||
.nest("/api", api::router())
|
||||
.route("/", get(root))
|
||||
.route("/ada", get(ada))
|
||||
.route("/shift_reports", get(shift_reports))
|
||||
.route("/shifts/:id/drinks", get(drinks))
|
||||
.route("/shifts/:id/report", get(shift_report))
|
||||
|
@ -141,3 +142,7 @@ async fn shift_reports(State(state): State<AppState>) -> impl IntoResponse {
|
|||
|
||||
render!(shift_reports_html, shifts)
|
||||
}
|
||||
|
||||
async fn ada() -> impl IntoResponse {
|
||||
render!(ada_html)
|
||||
}
|
||||
|
|
12
templates/ada.rs.html
Normal file
12
templates/ada.rs.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
@use super::base_html;
|
||||
@use super::components::ada_list_html;
|
||||
|
||||
@()
|
||||
|
||||
@:base_html({
|
||||
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
@:ada_list_html()
|
||||
</div>
|
||||
|
||||
})
|
5
templates/components/ada_list.rs.html
Normal file
5
templates/components/ada_list.rs.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
@()
|
||||
|
||||
<div>
|
||||
Oops, there should be a list here!
|
||||
</div>
|
Loading…
Reference in a new issue