Files
automatisch/packages/backend/src/apps/placetel/common/add-auth-header.js
2024-01-05 17:44:21 +01:00

10 lines
216 B
JavaScript

const addAuthHeader = ($, requestConfig) => {
if ($.auth.data?.apiToken) {
requestConfig.headers.Authorization = `Bearer ${$.auth.data.apiToken}`;
}
return requestConfig;
};
export default addAuthHeader;