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 {
|
func (s MongoDBStorage) DeleteBooking(bookingid string) error {
|
||||||
collection := s.Client.Database(s.DbName).Collection(s.Collections["bookings"])
|
collection := s.Client.Database(s.DbName).Collection(s.Collections["bookings"])
|
||||||
|
|
||||||
_, err := collection.UpdateOne(
|
_, err := collection.DeleteOne(
|
||||||
context.TODO(),
|
context.TODO(),
|
||||||
bson.M{"_id": bookingid},
|
bson.M{"_id": bookingid},
|
||||||
bson.D{
|
// bson.D{
|
||||||
{"$set", bson.D{{"deleted", true}}},
|
// {"$set", bson.D{{"deleted", true}}},
|
||||||
},
|
// },
|
||||||
)
|
)
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue