Controller for driver-related operations.
More...
Controller for driver-related operations.
◆ CreateOrUpdateBid()
async Task< IActionResult > hagglehaul.Server.Controllers.DriverController.CreateOrUpdateBid |
( |
[FromBody] CreateOrUpdateBid | request | ) |
|
Create or update a bid for a trip.
- Parameters
-
- Returns
- OkResult if the bid was successfully created or updated, BadRequestObjectResult if the tripId is invalid or the trip is either confirmed or in the past, UnauthorizedResult if the user is not a driver
◆ DeleteBid()
async Task< IActionResult > hagglehaul.Server.Controllers.DriverController.DeleteBid |
( |
[FromQuery] string | tripId | ) |
|
Delete a bid for a trip.
- Parameters
-
tripId | The ID of the trip to delete the user's bid from |
- Returns
- OkResult if the bid was successfully deleted, BadRequestObjectResult if the tripId is invalid or the trip is either confirmed or in the past, UnauthorizedResult if the user is not a driver
◆ Get()
async Task< IActionResult > hagglehaul.Server.Controllers.DriverController.Get |
( |
| ) |
|
Get the basic info of the current driver.
- Returns
- OkObjectResult if the driver's basic info is successfully returned, BadRequestObjectResult if the user is invalid or not authenticated, UnauthorizedResult if the user is not a driver
◆ GetAllAvailableTrips() [1/2]
async Task< IActionResult > hagglehaul.Server.Controllers.DriverController.GetAllAvailableTrips |
( |
| ) |
|
Get all biddable trips.
- Returns
- OkObjectResult if the biddable trips are successfully returned
◆ GetAllAvailableTrips() [2/2]
async Task< IActionResult > hagglehaul.Server.Controllers.DriverController.GetAllAvailableTrips |
( |
[FromBody] TripMarketOptions | options | ) |
|
Get biddable trips and filter and sort using options.
- Parameters
-
options | The filtering and searching options form. |
- Returns
- OkObjectResult if the biddable trips are successfully returned, BadRequestObjectResult if the options are invalid
◆ GetDashboard()
async Task< IActionResult > hagglehaul.Server.Controllers.DriverController.GetDashboard |
( |
| ) |
|
Gets the necessary info for a driver dashboard. Shows confirmed trips, trips in bidding, and past trips.
- Returns
- OkObjectResult if the dashboard is successfully returned, BadRequestObjectResult if the user is invalid or not authenticated, UnauthorizedResult if the user is not a driver
◆ ModifyAccountDetails()
async Task< IActionResult > hagglehaul.Server.Controllers.DriverController.ModifyAccountDetails |
( |
[FromBody] DriverUpdate | driverUpdate | ) |
|
Modify account details, including password.
- Parameters
-
driverUpdate | The update form. |
- Returns
- OkResult if the account details are successfully updated, BadRequestObjectResult if the user is invalid or not authenticated, UnauthorizedResult if the user is not a driver
◆ RateRider()
async Task< IActionResult > hagglehaul.Server.Controllers.DriverController.RateRider |
( |
[FromBody] GiveRating | giveRating | ) |
|
Rate a rider.
- Parameters
-
giveRating | The rating form. |
- Returns
- OkResult if the rider was successfully rated, BadRequestObjectResult if the user is invalid or not authenticated, UnauthorizedResult if the user is not a driver
The documentation for this class was generated from the following file:
- /Users/jacob/Documents/Projects/130-project/hagglehaul/hagglehaul.Server/Controllers/DriverController.cs