Merge pull request 'correct-name-in-notification' (#877) from correct-name-in-notification into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m53s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 11m28s

Reviewed-on: #877
This commit is contained in:
philipp 2025-03-09 13:34:42 +01:00
commit 1471ccad2c

View File

@ -104,10 +104,10 @@ impl Trip {
} }
if let Some(trip) = Trip::find_by_trip_details(db, notify.id).await { if let Some(trip) = Trip::find_by_trip_details(db, notify.id).await {
let user = User::find_by_id(db, trip.cox_id as i32).await.unwrap(); let user_earlier_trip = User::find_by_id(db, trip.cox_id as i32).await.unwrap();
Notification::create( Notification::create(
db, db,
&user, &user_earlier_trip,
&format!( &format!(
"{} hat eine Ausfahrt zur selben Zeit ({} um {}) wie du erstellt", "{} hat eine Ausfahrt zur selben Zeit ({} um {}) wie du erstellt",
user.name, trip.day, trip.planned_starting_time user.name, trip.day, trip.planned_starting_time