Enabled Json Web Token authorisation on backend, and frontend
This commit is contained in:
@@ -9,12 +9,16 @@ const getAuthLocalToken = () => {
|
||||
return localStorage.accessToken || '';
|
||||
}
|
||||
|
||||
const defaultParams = () =>({
|
||||
const defaultParams = () => ({
|
||||
method: 'get',
|
||||
responseType: 'json',
|
||||
headers: {
|
||||
Authorization: 'Bearer ' + getAuthLocalToken()
|
||||
}
|
||||
headers: getAuthLocalToken() !== '' ?
|
||||
{
|
||||
Authorization: 'Bearer ' + getAuthLocalToken()
|
||||
} :
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
const uploadParams = () =>({
|
||||
|
||||
Reference in New Issue
Block a user