new grpc functions
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 34s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 34s
This commit is contained in:
@@ -144,7 +144,12 @@ func (s MemoryStorage) GetBooking(id string) (res *types.Booking, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (s MemoryStorage) UpdateBookingStatus(bookingid string, newStatus string) error {
|
||||
func (s MemoryStorage) UpdateBooking(booking types.Booking) error {
|
||||
s.Bookings[booking.Id] = &booking
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s MemoryStorage) UpdateBookingStatus(bookingid string, newStatus string, reason string) error {
|
||||
b := s.Bookings[bookingid]
|
||||
|
||||
if b == nil {
|
||||
@@ -152,6 +157,7 @@ func (s MemoryStorage) UpdateBookingStatus(bookingid string, newStatus string) e
|
||||
}
|
||||
|
||||
b.Status = newStatus
|
||||
b.Data["reason"] = reason
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user