Doppia modalità di Registrazione con lista extra utenti

This commit is contained in:
Paolo Arena
2020-01-13 23:52:51 +01:00
parent 8f784df4fa
commit e23a3a792e
25 changed files with 829 additions and 163 deletions

View File

@@ -80,7 +80,7 @@ const userjson = JSON.stringify(users[0]);
const todos = [{
_id: new ObjectID(),
category: "personal",
// category: "personal",
statustodo: 0,
completed_at: new Date(),
created_at: new Date(),
@@ -96,7 +96,7 @@ const todos = [{
userId: users[0]._id
}, {
_id: new ObjectID(),
category: "personal",
// category: "personal",
statustodo: 0,
completed_at: new Date(),
created_at: new Date(),
@@ -112,7 +112,7 @@ const todos = [{
userId: users[0]._id
}, {
_id: new ObjectID(),
category: "personal",
// category: "personal",
statustodo: 0,
completed_at: new Date(),
created_at: new Date(),
@@ -127,7 +127,7 @@ const todos = [{
progress: 0,
}, { // RECORD CHE VERRA' UTILIZZATO PER AGGIUNGERE UN NUOVO TASK
_id: new ObjectID(),
category: "personal",
// category: "personal",
statustodo: 0,
completed_at: new Date(),
created_at: new Date(),
@@ -148,8 +148,8 @@ const populateTodos = (done) => {
Todo.deleteMany({})
.then(() => {
var TodoOne = new Todo(todos[0]).save();
var TodoTwo = new Todo(todos[1]).save();
const TodoOne = new Todo(todos[0]).save();
const TodoTwo = new Todo(todos[1]).save();
return Promise.all([TodoOne, TodoTwo])
}).then(() => {