busao
    Preparing search index...

    Function cancelTripByID

    • Cancels a trip via ID.

      Parameters

      • database: BunSQLiteDatabase

        The project's database.

      • id: string

        The ID of the trip.

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

      The trip as updated in the database.

      As a side-effect, if the trip was confirmed, it increases the priority of the oldest entry in the waitlist.