finalize todo
This commit is contained in:
@ -1,12 +1,16 @@
|
||||
use std::io::Write;
|
||||
|
||||
use ics::ICalendar;
|
||||
use ics::{components::Property, ICalendar};
|
||||
use sqlx::SqlitePool;
|
||||
|
||||
use crate::model::{event::Event, trip::Trip, user::User};
|
||||
|
||||
pub(crate) async fn get_personal_cal(db: &SqlitePool, user: &User) -> String {
|
||||
let mut calendar = ICalendar::new("2.0", "ics-rs");
|
||||
calendar.push(Property::new(
|
||||
"X-WR-CALNAME",
|
||||
"Donau Linz - Deine Ausfahrten",
|
||||
));
|
||||
|
||||
let events = Event::all_with_user(db, user).await;
|
||||
for event in events {
|
||||
|
Reference in New Issue
Block a user