@point-hub/papi 0.3.4 → 0.3.5
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.
- package/lib/index.js +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -60957,7 +60957,7 @@ class MongoDBConnection {
|
|
|
60957
60957
|
throw new Error("Collection not found");
|
|
60958
60958
|
}
|
|
60959
60959
|
const createOptions = options;
|
|
60960
|
-
const response = await this._collection.insertOne(document, createOptions);
|
|
60960
|
+
const response = await this._collection.insertOne(MongoDBHelper.stringToObjectId(document), createOptions);
|
|
60961
60961
|
return {
|
|
60962
60962
|
inserted_id: response.insertedId.toString()
|
|
60963
60963
|
};
|
|
@@ -60967,7 +60967,7 @@ class MongoDBConnection {
|
|
|
60967
60967
|
throw new Error("Collection not found");
|
|
60968
60968
|
}
|
|
60969
60969
|
const createManyOptions = options;
|
|
60970
|
-
const response = await this._collection.insertMany(documents, createManyOptions);
|
|
60970
|
+
const response = await this._collection.insertMany(MongoDBHelper.stringToObjectId(documents), createManyOptions);
|
|
60971
60971
|
const insertedIds = [];
|
|
60972
60972
|
Object.values(response.insertedIds).forEach((val) => {
|
|
60973
60973
|
insertedIds.push(val.toString());
|