https://learn.microsoft.com/en-us/azure/cosmos-db/partial-document-update#supported-operations says that I can use "increment" to increment a value in my database, however this code
const operations =
[
{ op: 'increment', path: '/public/inventory/irradish', value: irradish},
{ op: 'increment', path: '/public/inventory/sunmelon', value: sunmelon},
{ op: 'set', path: '/map/garden/lastUse', value: time}
];
const { resource: updated } = await container
.item(
id = email,
partitionKeyValue = email
)
throws this error:
Error: Message: {"Errors":["Invalid value of the patch operation 'op' property in patch request: 'increment'"]} ActivityId: f1bb8b88-ab68-4f2b-b244-8b021b0d9021,...
How do I increment?