switch from cox to steeringuser, which contains both cox + bootsfuehrer
This commit is contained in:
@@ -5,7 +5,7 @@ use super::{
|
||||
notification::Notification,
|
||||
trip::{Trip, TripWithUserAndType},
|
||||
tripdetails::TripDetails,
|
||||
user::{CoxUser, User},
|
||||
user::{SteeringUser, User},
|
||||
};
|
||||
use crate::model::tripdetails::{Action, CoxAtTrip::Yes};
|
||||
|
||||
@@ -197,7 +197,7 @@ impl UserTrip {
|
||||
let mut add_info = "";
|
||||
if let Some(trip) = &trip_to_delete {
|
||||
let cox = User::find_by_id(db, trip.cox_id as i32).await.unwrap();
|
||||
trip.delete(db, &CoxUser::new(db, cox).await.unwrap())
|
||||
trip.delete(db, &SteeringUser::new(db, cox).await.unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
add_info = " Das war die letzte angemeldete Person. Nachdem nun alle Bescheid wissen, wird die Ausfahrt ab sofort nicht mehr angezeigt.";
|
||||
@@ -270,7 +270,7 @@ pub enum UserTripDeleteError {
|
||||
mod test {
|
||||
use crate::{
|
||||
model::{
|
||||
event::Event, trip::Trip, tripdetails::TripDetails, user::CoxUser,
|
||||
event::Event, trip::Trip, tripdetails::TripDetails, user::SteeringUser,
|
||||
usertrip::UserTripError,
|
||||
},
|
||||
testdb,
|
||||
@@ -353,7 +353,7 @@ mod test {
|
||||
fn test_fail_create_is_cox_planned_event() {
|
||||
let pool = testdb!();
|
||||
|
||||
let cox = CoxUser::new(
|
||||
let cox = SteeringUser::new(
|
||||
&pool,
|
||||
User::find_by_name(&pool, "cox".into()).await.unwrap(),
|
||||
)
|
||||
|
Reference in New Issue
Block a user