- cleaned some code.

- routing offline
- pushNotification
This commit is contained in:
Paolo Arena
2019-02-12 12:06:01 +01:00
parent e755ada1ff
commit a024b78e95
21 changed files with 560 additions and 247 deletions

View File

@@ -7,7 +7,10 @@ async function sendRequest(url: string, lang: string, mytok: string, method: str
const authHeader = new Headers()
authHeader.append('content-Type', 'application/json')
authHeader.append('Accept', 'application/json')
authHeader.append('x-auth', mytok)
if (url !== process.env.MONGODB_HOST + '/users/login') {
authHeader.append('x-auth', mytok)
console.log('TOK PASSATO ALLA FETCH:', mytok)
}
// authHeader.append('accept-language', lang)
let configInit: RequestInit