mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +00:00
Fix bug data sent
This commit is contained in:
parent
ac382484b3
commit
97e8bd46e2
@ -1,5 +1,5 @@
|
|||||||
import { LOCATION_CHANGE } from 'react-router-redux';
|
import { LOCATION_CHANGE } from 'react-router-redux';
|
||||||
import { findIndex } from 'lodash';
|
import { findIndex, get } from 'lodash';
|
||||||
import { takeLatest, put, fork, take, cancel, select, call } from 'redux-saga/effects';
|
import { takeLatest, put, fork, take, cancel, select, call } from 'redux-saga/effects';
|
||||||
|
|
||||||
import request from 'utils/request';
|
import request from 'utils/request';
|
||||||
@ -64,7 +64,7 @@ export function* dataFetch(action) {
|
|||||||
export function* submitData(action) {
|
export function* submitData(action) {
|
||||||
try {
|
try {
|
||||||
const body = yield select(makeSelectModifiedData());
|
const body = yield select(makeSelectModifiedData());
|
||||||
const opts = { method: 'PUT', body: (action.endPoint === 'advanced') ? body.settings : body };
|
const opts = { method: 'PUT', body: (action.endPoint === 'advanced') ? get(body, ['advanced', 'settings'], {}) : body };
|
||||||
|
|
||||||
yield call(request, `/users-permissions/${action.endPoint}`, opts);
|
yield call(request, `/users-permissions/${action.endPoint}`, opts);
|
||||||
yield put(submitSucceeded());
|
yield put(submitSucceeded());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user