feat(placetel): Implement app structure with authentication

This commit is contained in:
Faruk AYDIN
2023-10-05 17:26:39 +02:00
parent 57bba90091
commit 712bee297a
6 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { TBeforeRequest } from '@automatisch/types';
const addAuthHeader: TBeforeRequest = ($, requestConfig) => {
if ($.auth.data?.apiToken) {
requestConfig.headers.Authorization = `Bearer ${$.auth.data.apiToken}`;
}
return requestConfig;
};
export default addAuthHeader;