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

BIN
.DS_Store vendored Normal file

Binary file not shown.

26
.vscode/launch.json vendored
View File

@@ -1,30 +1,18 @@
{
// Usare IntelliSense per informazioni sui possibili attributi.
// Al passaggio del mouse vengono visualizzate le descrizioni degli attributi esistenti.
// Per altre informazioni, visitare: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"name": "nodemon",
"program": "${workspaceFolder}",
"name": "ServerSide",
"program": "${workspaceFolder}/src/server/server.js",
"request": "launch",
"restart": true,
"runtimeExecutable": "nodemon",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}"
}
"env": {
"NODE_ENV":"development",
"TESTING_ON":"1"
}
},
]
}

View File

@@ -0,0 +1,11 @@
{
"folders": [
{
"path": "../.."
},
{
"path": "../../../newfreeplanet"
}
],
"settings": {}
}

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,
},