This commit is contained in:
Surya Paolo
2022-11-12 12:00:21 +01:00
parent ef8d40538b
commit cbd277f63c
4 changed files with 30 additions and 25 deletions

View File

@@ -2,7 +2,7 @@ const mongoose = require('mongoose').set('debug', false)
const Schema = mongoose.Schema;
const tools = require('../tools/general');
const {ObjectID} = require('mongodb');
const {ObjectID, ObjectId} = require('mongodb');
mongoose.Promise = global.Promise;
mongoose.level = "F";
@@ -15,9 +15,9 @@ mongoose.plugin(schema => {
const MyElemSchema = new Schema({
_id: {
type: ObjectID,
type: ObjectId,
default: function() {
return new ObjectID();
return new ObjectId();
},
},
idapp: {
@@ -29,7 +29,7 @@ const MyElemSchema = new Schema({
type: {
type: Number,
},
title: {
img: {
type: String,
},
container: {
@@ -41,6 +41,9 @@ const MyElemSchema = new Schema({
container3: {
type: String,
},
align: {
type: Number,
},
parambool: {
type: Boolean,
},
@@ -73,10 +76,10 @@ const MyElemSchema = new Schema({
type: Number,
},
heightimg: {
type: Number,
type: String,
},
widthimg: {
type: Number,
type: String,
},
width: {
type: Number,
@@ -84,6 +87,9 @@ const MyElemSchema = new Schema({
link: {
type: String,
},
fit: {
type: String,
},
onlyif_logged: {
type: Boolean,
},