feat(wordpress): add auth and new post trigger (#1160)

This commit is contained in:
Ali BARIN
2023-08-09 22:34:21 +02:00
committed by GitHub
parent 5046c4c911
commit ec42446daa
19 changed files with 284 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { TBeforeRequest } from '@automatisch/types';
const addAuthHeader: TBeforeRequest = ($, requestConfig) => {
const userLogin = $.auth.data.userLogin as string;
const password = $.auth.data.password as string;
if (userLogin && password) {
requestConfig.auth = {
username: userLogin,
password,
};
}
return requestConfig;
};
export default addAuthHeader;