add data field to bookings
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 31s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 31s
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func (h Handler) BookDriverJourney(passengerid string, driverid string, journeyid string, returnWaitingDuration time.Duration) (*types.Booking, error) {
|
||||
func (h Handler) BookDriverJourney(passengerid string, driverid string, journeyid string, returnWaitingDuration time.Duration, data map[string]any) (*types.Booking, error) {
|
||||
journey, err := h.Storage.GetDriverJourney(journeyid)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("could not find driver journey")
|
||||
@@ -28,6 +28,7 @@ func (h Handler) BookDriverJourney(passengerid string, driverid string, journeyi
|
||||
DriverId: driverid,
|
||||
Journey: journey,
|
||||
ReturnWaitingDuration: returnWaitingDuration,
|
||||
Data: data,
|
||||
}
|
||||
|
||||
if err := h.Storage.CreateBooking(booking); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user