feat(carbone): add carbone integration (#1405)

* feat(carbone): add carbone integration

* Update list-apps.spec.js to ensure Carbone is the first application in the alphabetically sorted list

Previously, the test expected DeepL to be the first in the list. Now, this change ensures that Carbone will take precedence as it will come first in the alphabetical order.
This commit is contained in:
Moaaz Elsayed
2023-11-07 14:00:22 +02:00
committed by GitHub
parent 2afcfbb4bc
commit a4a0102679
11 changed files with 989 additions and 3 deletions

View File

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