added (not yet working) code for login

This commit is contained in:
2019-03-14 17:13:24 +01:00
parent 18f22fdffa
commit 2cff1db5cb
17 changed files with 710 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
export function authHeader() {
// return authorization header with jwt token
// @ts-ignore
let user = JSON.parse(localStorage.getItem('user'));
if (user && user.token) {
return { 'Authorization': 'Bearer ' + user.token };
} else {
return {};
}
}