Skip to content

Commit

Permalink
fix(endpoint-micropub): remove deprecated checkKeys option
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Oct 8, 2024
1 parent 44f7f00 commit 330e023
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/endpoint-micropub/lib/post-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ export const postData = {
// Add data to posts collection (or replace existing if present)
if (hasDatabase) {
const query = { "properties.url": properties.url };
await posts.replaceOne(query, postData, {
checkKeys: false,
upsert: true,
});
await posts.replaceOne(query, postData, { upsert: true });
}

return postData;
Expand Down Expand Up @@ -166,7 +163,7 @@ export const postData = {
// Update data in posts collection
const postData = { _originalPath, path, properties };
const query = { "properties.url": url };
await posts.replaceOne(query, postData, { checkKeys: false });
await posts.replaceOne(query, postData);

return postData;
},
Expand Down Expand Up @@ -216,7 +213,7 @@ export const postData = {
// Update data in posts collection
const postData = { path, properties, _deletedProperties };
const query = { "properties.url": url };
await posts.replaceOne(query, postData, { checkKeys: false });
await posts.replaceOne(query, postData);

return postData;
},
Expand Down Expand Up @@ -263,7 +260,7 @@ export const postData = {
// Update data in posts collection
const postData = { path, properties };
const query = { "properties.url": url };
await posts.replaceOne(query, postData, { checkKeys: false });
await posts.replaceOne(query, postData);

return postData;
},
Expand Down

0 comments on commit 330e023

Please sign in to comment.