From 330e023783c45fe6e3d944e8f8e994bb7859ab41 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Tue, 8 Oct 2024 21:20:59 +0100 Subject: [PATCH] fix(endpoint-micropub): remove deprecated checkKeys option --- packages/endpoint-micropub/lib/post-data.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/endpoint-micropub/lib/post-data.js b/packages/endpoint-micropub/lib/post-data.js index e0c287043..628abf442 100644 --- a/packages/endpoint-micropub/lib/post-data.js +++ b/packages/endpoint-micropub/lib/post-data.js @@ -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; @@ -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; }, @@ -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; }, @@ -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; },