feat(mattermost): add auth and send message to channel action

* feat: mattermost integration

* post review adjustments
This commit is contained in:
KrzysztofDK
2023-06-29 16:45:57 +02:00
committed by GitHub
parent 6c5039f1ba
commit 676027245f
21 changed files with 356 additions and 0 deletions

View File

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