@truedat/bg 4.48.9 → 4.48.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,11 +5,10 @@ import { API_DOMAINS } from "../api";
5
5
 
6
6
  export function* createDomainSaga({ payload }) {
7
7
  try {
8
- const { domain } = payload;
9
8
  const url = API_DOMAINS;
10
- const requestData = { domain };
11
- yield put(createDomain.request());
12
- const { data } = yield call(apiJsonPost, url, requestData, JSON_OPTS);
9
+ const body = { domain: payload };
10
+ yield put(createDomain.request(payload));
11
+ const { data } = yield call(apiJsonPost, url, body, JSON_OPTS);
13
12
  yield put(createDomain.success(data));
14
13
  } catch (error) {
15
14
  if (error.response) {
@@ -6,13 +6,12 @@ import { API_DOMAIN } from "../api";
6
6
 
7
7
  const toApiPath = compile(API_DOMAIN);
8
8
 
9
- export function* updateDomainSaga({ payload }) {
9
+ export function* updateDomainSaga({ payload: domain }) {
10
10
  try {
11
- const { domain } = payload;
12
11
  const url = toApiPath(domain);
13
- const requestData = { domain };
12
+ const body = { domain };
14
13
  yield put(updateDomain.request());
15
- const { data } = yield call(apiJsonPut, url, requestData, JSON_OPTS);
14
+ const { data } = yield call(apiJsonPut, url, body, JSON_OPTS);
16
15
  yield put(updateDomain.success(data));
17
16
  } catch (error) {
18
17
  if (error.response) {