Revert logging change and remove auto action on board removal

This commit is contained in:
kiswa 2017-02-03 23:23:20 +00:00
parent 5deb398f24
commit 4d255af99e
2 changed files with 6 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class AutoActions extends BaseController {
return $this->jsonResponse($response, 403);
}
$before = $action->export();
$before = $action;
R::trash($action);
$actor = R::load('user', Auth::GetUserId($request));

View File

@ -168,6 +168,11 @@ class Boards extends BaseController {
$actor->username . ' removed board ' . $before->name,
json_encode($before), '', 'board', $id);
$actions = R::find('autoaction', 'board_id = ?', [ $id ]);
foreach ($actions as $action) {
R::trash($action);
}
$this->apiJson->setSuccess();
$this->apiJson->addAlert('success',
'Board ' . $before->name . ' removed.');