working login
This commit is contained in:
12
src/services/auth.header.ts
Normal file
12
src/services/auth.header.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export default function authHeader (): Record<string, string> {
|
||||
|
||||
let user_token = localStorage.getItem('auth_user')
|
||||
let auth_token = localStorage.getItem('auth_token')
|
||||
|
||||
if (user_token && auth_token) {
|
||||
return { 'Authorization': 'bearer ' + auth_token };
|
||||
}
|
||||
else {
|
||||
return {'Authorization': 'None'};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user