diff --git a/src/rest/misc.rs b/src/rest/misc.rs index 8291b7a..7190750 100644 --- a/src/rest/misc.rs +++ b/src/rest/misc.rs @@ -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 sqlx::SqlitePool; @@ -10,8 +10,8 @@ async fn faq(user: User) -> Template { } #[get("/cal")] -async fn cal(db: &State) -> String { - PlannedEvent::get_ics_feed(db).await +async fn cal(db: &State) -> (ContentType, String) { + (ContentType::Calendar, PlannedEvent::get_ics_feed(db).await) } pub fn routes() -> Vec {