Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e25f39140a | ||
|
|
744af76df2 |
@@ -225,12 +225,9 @@ 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{
|
|
||||||
{"$set", bson.D{{"deleted", true}}},
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user