mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-25 01:35:20 +01:00
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) {
|
||||
return function (dispatch, getState) {
|
||||
const state = getState().admin.newInstanceBlocks[domain];
|
||||
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, {
|
||||
formKeys: ["domain", "obfuscate", "public_comment", "private_comment"],
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user