Take the pain out of keeping all your calendars together

feat: add /calendar/foo API route

a.starrysky.fyi 4c6af959 b7343015

verified
Changed files
+9 -1
src
+5
src/calendar.rs
··· 1 + use axum::extract::Path; 2 + 3 + pub(crate) async fn route(Path(_path): Path<String>) -> String { 4 + "hello world!".to_string() 5 + }
+4 -1
src/main.rs
··· 1 + mod calendar; 2 + 1 3 #[cfg(feature = "ssr")] 2 4 #[tokio::main] 3 5 async fn main() { 4 - use axum::Router; 6 + use axum::{routing::get, Router}; 5 7 use leptos::logging::log; 6 8 use leptos::prelude::*; 7 9 use leptos_axum::{generate_route_list, LeptosRoutes}; ··· 14 16 let routes = generate_route_list(App); 15 17 16 18 let app = Router::new() 19 + .route("/calendar/{id}", get(calendar::route)) 17 20 .leptos_routes(&leptos_options, routes, { 18 21 let leptos_options = leptos_options.clone(); 19 22 move || shell(leptos_options.clone())