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.

24
.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", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"console": "integratedTerminal", "name": "ServerSide",
"internalConsoleOptions": "neverOpen", "program": "${workspaceFolder}/src/server/server.js",
"name": "nodemon",
"program": "${workspaceFolder}",
"request": "launch", "request": "launch",
"restart": true,
"runtimeExecutable": "nodemon",
"skipFiles": [ "skipFiles": [
"<node_internals>/**" "<node_internals>/**"
], ],
"type": "node"
},
{
"type": "node", "type": "node",
"request": "launch", "env": {
"name": "Launch Program", "NODE_ENV":"development",
"skipFiles": [ "TESTING_ON":"1"
"<node_internals>/**"
],
"program": "${file}"
} }
},
] ]
} }

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