busao
    Preparing search index...

    Function addTrips

    • Schedule trips based on provided information.

      Parameters

      • database: BunSQLiteDatabase

        The project's database.

      • passengerInputs: PassengerInput[]

        Passenger information necessary to register a trip.

      Returns Promise<
          {
              date: string;
              id: string;
              name: string;
              status: "cancelled"
              | "confirmed"
              | "waitlist";
              trip: "oneWay" | "return";
              tripToken: string;
          }[],
      >

      The trips as added to the database.

      passengerInputs is a list to support roundtrips.

      If the seat count for the direction of the trip is at capacity, the trip is added to the waitlist and put on hold.

      DatabaseSelectionError Thrown in case the "configuration" table has no rows.