Add motivation field to organized carpool bookings
All checks were successful
Build and Push Docker Image / build_and_push (push) Successful in 1m58s
All checks were successful
Build and Push Docker Image / build_and_push (push) Successful in 1m58s
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
// Book handles the booking flow
|
||||
func (h *CarpoolServiceHandler) Book(booking ocss.Booking) (*internal.Booking, error) {
|
||||
func (h *CarpoolServiceHandler) Book(booking ocss.Booking, motivation *string) (*internal.Booking, error) {
|
||||
log.Debug().Any("booking", booking).Msg("handler - Book")
|
||||
log.Debug().Str("passengerPickupDate", booking.PassengerPickupDate.ToTime().Format(time.RFC3339)).Msg("handler - Book")
|
||||
log.Debug().Str("internal_operator_id", h.InternalOperatorID).Str("driver_operator", booking.Driver.Operator).Str("passenger_operator", booking.Passenger.Operator).Msg("operator comparison")
|
||||
@@ -62,6 +62,7 @@ func (h *CarpoolServiceHandler) Book(booking ocss.Booking) (*internal.Booking, e
|
||||
}
|
||||
|
||||
futureBooking.Booking = booking
|
||||
futureBooking.Motivation = motivation
|
||||
|
||||
err := h.Storage.CreateBooking(futureBooking)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user