feat(openai): add app with auth

This commit is contained in:
Ali BARIN
2023-01-17 13:20:28 +01:00
parent 0870fa7e8f
commit 577d5215cd
7 changed files with 82 additions and 0 deletions

View File

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