Added base supplement functionality.
This commit is contained in:
@@ -25,8 +25,6 @@ const errorLink = onError(
|
||||
}
|
||||
if (expired) {
|
||||
//User access token has expired
|
||||
//props.history.push("/network-error");
|
||||
console.log("We need a new token!");
|
||||
console.log("Old Token", window.localStorage.getItem("token"));
|
||||
// Let's refresh token through async request
|
||||
|
||||
@@ -35,15 +33,15 @@ const errorLink = onError(
|
||||
console.log("Got the new token.", token);
|
||||
window.localStorage.setItem("token", token);
|
||||
|
||||
const oldHeaders = operation.getContext().headers;
|
||||
operation.setContext({
|
||||
headers: {
|
||||
...oldHeaders,
|
||||
authorization: token ? `Bearer ${token}` : ""
|
||||
}
|
||||
});
|
||||
console.log("forward", forward);
|
||||
console.log("operation", operation);
|
||||
// const oldHeaders = operation.getContext().headers;
|
||||
// operation.setContext({
|
||||
// headers: {
|
||||
// ...oldHeaders,
|
||||
// authorization: token ? `Bearer ${token}` : ""
|
||||
// }
|
||||
// });
|
||||
// console.log("forward", forward);
|
||||
// console.log("operation", operation);
|
||||
return forward(operation).subscribe();
|
||||
|
||||
// return new Observable(observer => {
|
||||
|
||||
@@ -120,6 +120,7 @@ export const GET_JOB_BY_PK = gql`
|
||||
ins_co_id
|
||||
policy_no
|
||||
loss_date
|
||||
clm_no
|
||||
area_of_damage
|
||||
ins_co_nm
|
||||
ins_addr1
|
||||
|
||||
Reference in New Issue
Block a user