feat: Add DeepL integration with translate text action

This commit is contained in:
Faruk AYDIN
2022-11-07 18:28:20 +01:00
parent d681d06de1
commit 527dfe6971
9 changed files with 242 additions and 0 deletions

View File

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