Fix Mongo update overload ambiguity

This commit is contained in:
Zeeshaun
2026-05-05 16:29:12 +00:00
parent 94cc9a41af
commit 917a6cb61d
+4 -1
View File
@@ -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 });
});