Revert logging change and remove auto action on board removal
This commit is contained in:
parent
5deb398f24
commit
4d255af99e
@ -93,7 +93,7 @@ class AutoActions extends BaseController {
|
|||||||
return $this->jsonResponse($response, 403);
|
return $this->jsonResponse($response, 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
$before = $action->export();
|
$before = $action;
|
||||||
R::trash($action);
|
R::trash($action);
|
||||||
|
|
||||||
$actor = R::load('user', Auth::GetUserId($request));
|
$actor = R::load('user', Auth::GetUserId($request));
|
||||||
|
@ -168,6 +168,11 @@ class Boards extends BaseController {
|
|||||||
$actor->username . ' removed board ' . $before->name,
|
$actor->username . ' removed board ' . $before->name,
|
||||||
json_encode($before), '', 'board', $id);
|
json_encode($before), '', 'board', $id);
|
||||||
|
|
||||||
|
$actions = R::find('autoaction', 'board_id = ?', [ $id ]);
|
||||||
|
foreach ($actions as $action) {
|
||||||
|
R::trash($action);
|
||||||
|
}
|
||||||
|
|
||||||
$this->apiJson->setSuccess();
|
$this->apiJson->setSuccess();
|
||||||
$this->apiJson->addAlert('success',
|
$this->apiJson->addAlert('success',
|
||||||
'Board ' . $before->name . ' removed.');
|
'Board ' . $before->name . ' removed.');
|
||||||
|
Reference in New Issue
Block a user