- fix: Date problems... (it was a bad "copy" function, the object date was not valid...)
- fix: error fetch on loading... (offline appeared)
This commit is contained in:
@@ -24,6 +24,11 @@ const userTwoId = new ObjectID();
|
||||
let mypwdchiaro = 'mypassword@1A';
|
||||
let mypwdcrypted = '$2b$12$mteST.isuWO0SNsfeZ0aCe.Dz3qwPh5SU8t9rc5SaPTkb3j0ywGv6'
|
||||
|
||||
const date_login = new Date();
|
||||
|
||||
// const useragent = "auth Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36"
|
||||
const useragent = "node-superagent/2.3.0";
|
||||
|
||||
const users = [{
|
||||
_id: userOneId,
|
||||
keyappid: process.env.KEY_APP_ID,
|
||||
@@ -33,8 +38,9 @@ const users = [{
|
||||
username: 'paoloar77B',
|
||||
password: mypwdcrypted,
|
||||
tokens: [{
|
||||
access: 'auth',
|
||||
token: jwt.sign({ _id: userOneId, access: 'auth' }, process.env.SIGNCODE).toString()
|
||||
access: 'auth ' + useragent,
|
||||
token: jwt.sign({ _id: userOneId, access: 'auth ' + useragent }, process.env.SIGNCODE).toString(),
|
||||
date_login
|
||||
}]
|
||||
},
|
||||
{
|
||||
@@ -46,8 +52,9 @@ const users = [{
|
||||
password: mypwdcrypted,
|
||||
username: 'paoloar77C',
|
||||
tokens: [{
|
||||
access: 'auth',
|
||||
token: jwt.sign({ _id: userTwoId, access: 'auth' }, process.env.SIGNCODE).toString()
|
||||
access: 'auth ' + useragent,
|
||||
token: jwt.sign({ _id: userTwoId, access: 'auth ' + useragent }, process.env.SIGNCODE).toString(),
|
||||
date_login
|
||||
}]
|
||||
}, {
|
||||
keyappid: process.env.KEY_APP_ID, // RECORD CHE VERRA' UTILIZZATO PER UNA NUOVA REGISTRAZIONE
|
||||
@@ -67,15 +74,15 @@ const todos = [{
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
completed_at: 0,
|
||||
created_at: 6,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Primo Task Esempio",
|
||||
enableExpiring: false,
|
||||
expiring_at: 16,
|
||||
expiring_at: new Date(),
|
||||
id_next: "10000000",
|
||||
id_prev: "0",
|
||||
modified: false,
|
||||
modify_at: 6,
|
||||
modify_at: new Date(),
|
||||
pos: 1,
|
||||
priority: 1,
|
||||
progress: 0,
|
||||
@@ -84,15 +91,15 @@ const todos = [{
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
completed_at: 0,
|
||||
created_at: 6,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Secondo Task Esempio",
|
||||
enableExpiring: false,
|
||||
expiring_at: 16,
|
||||
expiring_at: new Date(),
|
||||
id_next: "10000000",
|
||||
id_prev: "1",
|
||||
modified: false,
|
||||
modify_at: 6,
|
||||
modify_at: new Date(),
|
||||
pos: 2,
|
||||
priority: 1,
|
||||
progress: 0,
|
||||
@@ -101,15 +108,15 @@ const todos = [{
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
completed_at: 0,
|
||||
created_at: 6,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Terzo Task Esempio",
|
||||
enableExpiring: false,
|
||||
expiring_at: 16,
|
||||
expiring_at: new Date(),
|
||||
id_next: "10000000",
|
||||
id_prev: "1",
|
||||
modified: false,
|
||||
modify_at: 6,
|
||||
modify_at: new Date(),
|
||||
pos: 3,
|
||||
priority: 1,
|
||||
progress: 0,
|
||||
@@ -118,15 +125,15 @@ const todos = [{
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
completed_at: 0,
|
||||
created_at: 6,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Nuovo Quarto Task Esempio da Inserire",
|
||||
enableExpiring: false,
|
||||
expiring_at: 16,
|
||||
expiring_at: new Date(),
|
||||
id_next: "10000000",
|
||||
id_prev: "2",
|
||||
modified: false,
|
||||
modify_at: 6,
|
||||
modify_at: new Date(),
|
||||
pos: 4,
|
||||
priority: 1,
|
||||
progress: 0,
|
||||
@@ -167,4 +174,4 @@ const populateUsers = (done) => {
|
||||
|
||||
};
|
||||
|
||||
module.exports = { todos, populateTodos, users, populateUsers, userjson, mypwdcrypted, mypwdchiaro };
|
||||
module.exports = { todos, populateTodos, users, populateUsers, userjson, mypwdcrypted, mypwdchiaro, date_login };
|
||||
|
||||
Reference in New Issue
Block a user