forked from Ruderverein-Donau-Linz/rowt
remove donau linz stuff
This commit is contained in:
@@ -232,10 +232,8 @@ WHERE trip_details.id=?
|
||||
}
|
||||
|
||||
async fn advertise(db: &SqlitePool, day: &str, planned_starting_time: &str, name: &str) {
|
||||
let donau = Role::find_by_name(db, "Donau Linz").await.unwrap();
|
||||
Notification::create_for_role(
|
||||
Notification::create_for_all(
|
||||
db,
|
||||
&donau,
|
||||
&format!("Am {} um {} wurde ein neues Event angelegt: {} Wir freuen uns wenn du dabei mitmachst, die Anmeldung ist ab sofort offen :-)", day, planned_starting_time, name),
|
||||
"Neues Event",
|
||||
Some(&format!("/planned#{day}")),
|
||||
|
@@ -89,6 +89,20 @@ impl Notification {
|
||||
tx.commit().await.unwrap();
|
||||
}
|
||||
|
||||
pub async fn create_for_all(
|
||||
db: &SqlitePool,
|
||||
message: &str,
|
||||
category: &str,
|
||||
link: Option<&str>,
|
||||
action_after_reading: Option<&str>,
|
||||
) {
|
||||
let users = User::all(db).await;
|
||||
|
||||
for user in users {
|
||||
Self::create(db, &user, message, category, link, action_after_reading).await;
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn create_for_steering_people_tx(
|
||||
db: &mut Transaction<'_, Sqlite>,
|
||||
message: &str,
|
||||
|
@@ -7,10 +7,7 @@ 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",
|
||||
));
|
||||
calendar.push(Property::new("X-WR-CALNAME", "ruad.at - Deine Ausfahrten"));
|
||||
|
||||
let events = Event::all_with_user(db, user).await;
|
||||
for event in events {
|
||||
|
Reference in New Issue
Block a user