Fix Mongo update overload ambiguity
This commit is contained in:
+4
-1
@@ -227,7 +227,10 @@ app.MapPatch("/api/orders/{orderId}/status", async (string orderId, UpdateOrderS
|
||||
ReturnDocument = ReturnDocument.After
|
||||
};
|
||||
|
||||
var order = await orderCollection.FindOneAndUpdateAsync(order => order.Id == orderId, update, options);
|
||||
var order = await orderCollection.FindOneAndUpdateAsync<OrderDocument>(
|
||||
order => order.Id == orderId,
|
||||
update,
|
||||
options);
|
||||
return Results.Json(new { order });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user