mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-10-31 22:40:01 +00:00
implement editing domain blocks by delete + recreate
This commit is contained in:
parent
558b448ab2
commit
b5364a8ab4
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue