- 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:
Paolo Arena
2019-02-11 02:58:53 +01:00
parent 4d5cea1c17
commit e755ada1ff
13 changed files with 127 additions and 85 deletions

View File

@@ -278,6 +278,8 @@ namespace Actions {
const token = UserStore.state.idToken
console.log('TODO TO SAVE: ', itemtodo)
let res = await Api.SendReq(call, UserStore.state.lang, token, method, itemtodo)
.then(({ res, newItem }) => {
console.log('dbInsertSaveTodo RIS =', newItem)

View File

@@ -92,7 +92,7 @@ namespace Mutations {
state.category = data.categorySel
// @ts-ignore
state.tokens = [
{ access: 'auth', token: data.idToken }
{ access: 'auth ' + navigator.userAgent, token: data.idToken, date_login: new Date() }
]
}
@@ -114,7 +114,7 @@ namespace Mutations {
if (!state.tokens) {
state.tokens = []
}
state.tokens.push({ access: 'auth', token: data.idToken })
state.tokens.push({ access: 'auth ' + navigator.userAgent, token: data.idToken, data_login: new Date() })
}
function setServerCode(state: IUserState, num: number) {
@@ -143,6 +143,7 @@ namespace Mutations {
if (state.servercode !== rescodes.ERR_SERVERFETCH) {
state.servercode = err
}
console.log('Err catch: (servercode:', err, ')')
}
function getMsgError(state: IUserState, err: number) {