Skip to content

Commit 330e023

Browse files
fix(endpoint-micropub): remove deprecated checkKeys option
1 parent 44f7f00 commit 330e023

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/endpoint-micropub/lib/post-data.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ export const postData = {
6363
// Add data to posts collection (or replace existing if present)
6464
if (hasDatabase) {
6565
const query = { "properties.url": properties.url };
66-
await posts.replaceOne(query, postData, {
67-
checkKeys: false,
68-
upsert: true,
69-
});
66+
await posts.replaceOne(query, postData, { upsert: true });
7067
}
7168

7269
return postData;
@@ -166,7 +163,7 @@ export const postData = {
166163
// Update data in posts collection
167164
const postData = { _originalPath, path, properties };
168165
const query = { "properties.url": url };
169-
await posts.replaceOne(query, postData, { checkKeys: false });
166+
await posts.replaceOne(query, postData);
170167

171168
return postData;
172169
},
@@ -216,7 +213,7 @@ export const postData = {
216213
// Update data in posts collection
217214
const postData = { path, properties, _deletedProperties };
218215
const query = { "properties.url": url };
219-
await posts.replaceOne(query, postData, { checkKeys: false });
216+
await posts.replaceOne(query, postData);
220217

221218
return postData;
222219
},
@@ -263,7 +260,7 @@ export const postData = {
263260
// Update data in posts collection
264261
const postData = { path, properties };
265262
const query = { "properties.url": url };
266-
await posts.replaceOne(query, postData, { checkKeys: false });
263+
await posts.replaceOne(query, postData);
267264

268265
return postData;
269266
},

0 commit comments

Comments
 (0)