use rocket::{get, routes, Route, State}; use rocket_dyn_templates::{context, Template}; use sqlx::SqlitePool; use crate::model::{planned_event::PlannedEvent, user::User}; #[get("/faq")] async fn faq(user: User) -> Template { Template::render("faq", context!(loggedin_user: user)) } #[get("/cal")] async fn cal(db: &State) -> String { PlannedEvent::get_ics_feed(db).await } pub fn routes() -> Vec { routes![faq, cal] }