delete reservation
This commit is contained in:
parent
ce5e5f7acb
commit
744af76df2
|
@ -225,12 +225,12 @@ func (s MongoDBStorage) GetBookingsForDriver(driver string) (bookings []Booking,
|
|||
func (s MongoDBStorage) DeleteBooking(bookingid string) error {
|
||||
collection := s.Client.Database(s.DbName).Collection(s.Collections["bookings"])
|
||||
|
||||
_, err := collection.UpdateOne(
|
||||
_, err := collection.DeleteOne(
|
||||
context.TODO(),
|
||||
bson.M{"_id": bookingid},
|
||||
bson.D{
|
||||
{"$set", bson.D{{"deleted", true}}},
|
||||
},
|
||||
// bson.D{
|
||||
// {"$set", bson.D{{"deleted", true}}},
|
||||
// },
|
||||
)
|
||||
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue