busao
    Preparing search index...

    Function handleAdminClear

    • Handles the cancellation of all trips of a certain direction.

      Parameters

      • i18n: i18n

        The internationalisation object.

      • request: BunRequest

        The request to the associated endpoint.

      • database: BunSQLiteDatabase

        The project's database.

      • date: Date

        The current date.

      • trip: TripDirection

        The trip direction.

      Returns Promise<Response>

      A request to remove all trips on the tables associated with the direction in case the admin is properly authenticated. Otherwise, returns an "Unauthorized" page.