forked from Ruderverein-Donau-Linz/rowt
set content type
This commit is contained in:
parent
b6057f066d
commit
7614cab806
@ -1,4 +1,4 @@
|
|||||||
use rocket::{get, routes, Route, State};
|
use rocket::{get, http::ContentType, routes, Route, State};
|
||||||
use rocket_dyn_templates::{context, Template};
|
use rocket_dyn_templates::{context, Template};
|
||||||
use sqlx::SqlitePool;
|
use sqlx::SqlitePool;
|
||||||
|
|
||||||
@ -10,8 +10,8 @@ async fn faq(user: User) -> Template {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[get("/cal")]
|
#[get("/cal")]
|
||||||
async fn cal(db: &State<SqlitePool>) -> String {
|
async fn cal(db: &State<SqlitePool>) -> (ContentType, String) {
|
||||||
PlannedEvent::get_ics_feed(db).await
|
(ContentType::Calendar, PlannedEvent::get_ics_feed(db).await)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn routes() -> Vec<Route> {
|
pub fn routes() -> Vec<Route> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user