implement editing domain blocks by delete + recreate
This commit is contained in:
parent
558b448ab2
commit
b5364a8ab4
|
@ -59,8 +59,10 @@ module.exports = function ({ apiCall, getChanges }) {
|
||||||
|
|
||||||
updateDomainBlock: function updateDomainBlock(domain) {
|
updateDomainBlock: function updateDomainBlock(domain) {
|
||||||
return function (dispatch, getState) {
|
return function (dispatch, getState) {
|
||||||
|
const state = getState().admin.newInstanceBlocks[domain];
|
||||||
return Promise.try(() => {
|
return Promise.try(() => {
|
||||||
const state = getState().admin.newInstanceBlocks[domain];
|
return dispatch(apiCall("DELETE", `/api/v1/admin/domain_blocks/${state.id}`));
|
||||||
|
}).then(() => {
|
||||||
const update = getChanges(state, {
|
const update = getChanges(state, {
|
||||||
formKeys: ["domain", "obfuscate", "public_comment", "private_comment"],
|
formKeys: ["domain", "obfuscate", "public_comment", "private_comment"],
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue