Now loggedinuser cookie variable is sent in our header on each call.
This commit is contained in:
@@ -46,6 +46,7 @@ export function fetchJSON(url, method, data) {
|
|||||||
headers: new Headers({
|
headers: new Headers({
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'authorization': getCookie('token'),
|
'authorization': getCookie('token'),
|
||||||
|
'loggedinuser': getCookie('loggedInUser'),
|
||||||
}),
|
}),
|
||||||
body: JSON.stringify(data)
|
body: JSON.stringify(data)
|
||||||
}).then(checkStatus).then(parseJSON);
|
}).then(checkStatus).then(parseJSON);
|
||||||
|
|||||||
Reference in New Issue
Block a user