| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 4x 4x 4x 4x 4x 4x | import { isNil } from 'lodash';
import { localStorage } from '../../utility';
/* eslint import/prefer-default-export:"off" */
export function getCommonMeta(connector) {
const token = localStorage.getAuthToken();
const headers = {};
Iif (!isNil(token)) {
headers.authorization = `Bearer ${token}`;
}
Eif (connector) {
headers['X-NSFT-CONNECTOR-INSTANCE'] = connector.id;
}
return {
headers,
};
}
|