add notification to all pot. coxes if trip is full
This commit is contained in:
		@@ -30,12 +30,12 @@ pub struct Trip {
 | 
			
		||||
pub struct TripWithUserAndType {
 | 
			
		||||
    #[serde(flatten)]
 | 
			
		||||
    pub trip: Trip,
 | 
			
		||||
    rower: Vec<Registration>,
 | 
			
		||||
    pub rower: Vec<Registration>,
 | 
			
		||||
    trip_type: Option<TripType>,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl TripWithUserAndType {
 | 
			
		||||
    async fn from(db: &SqlitePool, trip: Trip) -> Self {
 | 
			
		||||
    pub async fn from(db: &SqlitePool, trip: Trip) -> Self {
 | 
			
		||||
        let mut trip_type = None;
 | 
			
		||||
        if let Some(trip_type_id) = trip.trip_type_id {
 | 
			
		||||
            trip_type = TripType::find_by_id(db, trip_type_id).await;
 | 
			
		||||
@@ -230,6 +230,9 @@ WHERE day=?
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let trip_details = TripDetails::find_by_id(db, trip_details_id).await.unwrap();
 | 
			
		||||
        trip_details.check_free_spaces(db).await;
 | 
			
		||||
 | 
			
		||||
        Ok(())
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user