fix: [API] /servers/restartWorkers response fixed for API users, fixes #4966

pull/5018/head
iglocska 2019-08-08 11:19:21 +02:00
parent e8dd0e536f
commit 7b6a7a5a65
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 3 additions and 0 deletions

View File

@ -1322,6 +1322,9 @@ class ServersController extends AppController
throw new MethodNotAllowedException();
}
$this->Server->restartWorkers($this->Auth->user());
if ($this->_isRest()) {
return $this->RestResponse->saveSuccessResponse('Server', 'restartWorkers', false, $this->response->type(), __('Restarting workers.'));
}
$this->redirect(array('controller' => 'servers', 'action' => 'serverSettings', 'workers'));
}