mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +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 { findIndex } from 'lodash';
|
||||
import { findIndex, get } from 'lodash';
|
||||
import { takeLatest, put, fork, take, cancel, select, call } from 'redux-saga/effects';
|
||||
|
||||
import request from 'utils/request';
|
||||
@ -64,7 +64,7 @@ export function* dataFetch(action) {
|
||||
export function* submitData(action) {
|
||||
try {
|
||||
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 put(submitSucceeded());
|
||||
|
Loading…
x
Reference in New Issue
Block a user