@cellaware/utils 3.3.33 → 3.3.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,10 +124,10 @@ export async function cosmosDelete(databaseId, collectionId, partitionKey, query
124
124
  const { resources } = await container.items.query({
125
125
  query
126
126
  }).fetchAll();
127
+ // NOTE: need to remove the '/' at the beginning.
128
+ const partitionKeyColumn = partitionKey.startsWith('/') ? partitionKey.substring(1) : partitionKey;
127
129
  resources.forEach(doc => {
128
- console.log(doc.id);
129
- console.log(doc[partitionKey]);
130
- container.item(doc.id, doc[partitionKey]).delete();
130
+ container.item(doc.id, doc[partitionKeyColumn]).delete();
131
131
  });
132
132
  return true;
133
133
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "3.3.33",
3
+ "version": "3.3.34",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",