@@ -63,10 +63,7 @@ export const postData = {
63
63
// Add data to posts collection (or replace existing if present)
64
64
if ( hasDatabase ) {
65
65
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 } ) ;
70
67
}
71
68
72
69
return postData ;
@@ -166,7 +163,7 @@ export const postData = {
166
163
// Update data in posts collection
167
164
const postData = { _originalPath, path, properties } ;
168
165
const query = { "properties.url" : url } ;
169
- await posts . replaceOne ( query , postData , { checkKeys : false } ) ;
166
+ await posts . replaceOne ( query , postData ) ;
170
167
171
168
return postData ;
172
169
} ,
@@ -216,7 +213,7 @@ export const postData = {
216
213
// Update data in posts collection
217
214
const postData = { path, properties, _deletedProperties } ;
218
215
const query = { "properties.url" : url } ;
219
- await posts . replaceOne ( query , postData , { checkKeys : false } ) ;
216
+ await posts . replaceOne ( query , postData ) ;
220
217
221
218
return postData ;
222
219
} ,
@@ -263,7 +260,7 @@ export const postData = {
263
260
// Update data in posts collection
264
261
const postData = { path, properties } ;
265
262
const query = { "properties.url" : url } ;
266
- await posts . replaceOne ( query , postData , { checkKeys : false } ) ;
263
+ await posts . replaceOne ( query , postData ) ;
267
264
268
265
return postData ;
269
266
} ,
0 commit comments