- Cataloghi
- Import ed Export Pagine - ObjectID sostituita con ObjectId
This commit is contained in:
@@ -3,7 +3,7 @@ const Schema = mongoose.Schema;
|
||||
|
||||
const tools = require('../tools/general');
|
||||
|
||||
const { ObjectID } = require('mongodb');
|
||||
const { ObjectId } = require('mongodb');
|
||||
|
||||
mongoose.Promise = global.Promise;
|
||||
mongoose.level = "F";
|
||||
@@ -129,7 +129,7 @@ SettingsSchema.statics.setKeyNum = async function (idapp, key, value) {
|
||||
let myrec = await Settings.findOne({ idapp, key });
|
||||
if (!myrec) {
|
||||
myrec = new Settings({ key });
|
||||
myrec._id = new ObjectID();
|
||||
myrec._id = new ObjectId();
|
||||
myrec.idapp = idapp;
|
||||
myrec.type = tools.FieldType.number;
|
||||
myrec.value_num = value;
|
||||
@@ -149,7 +149,7 @@ SettingsSchema.statics.setBool = async function (idapp, key, valbool) {
|
||||
let myrec = await Settings.findOne({ idapp, key });
|
||||
if (!myrec) {
|
||||
myrec = new Settings({ key });
|
||||
myrec._id = new ObjectID();
|
||||
myrec._id = new ObjectId();
|
||||
myrec.idapp = idapp;
|
||||
myrec.type = tools.FieldType.boolean;
|
||||
myrec.value_bool = valbool;
|
||||
|
||||
Reference in New Issue
Block a user