20 lines
453 B
Rust
20 lines
453 B
Rust
|
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<SqlitePool>) -> String {
|
||
|
PlannedEvent::get_ics_feed(db).await
|
||
|
}
|
||
|
|
||
|
pub fn routes() -> Vec<Route> {
|
||
|
routes![faq, cal]
|
||
|
}
|