diff options
author | Joas Schilling <coding@schilljs.com> | 2019-10-09 12:51:28 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-10-10 12:19:22 +0300 |
commit | 8aa2aa2efe53ca0f2cdcb1b7a05812cb9930e52e (patch) | |
tree | 16d24a47ee0a21c85f3f6bc8e4026f87b8770ec9 /lib | |
parent | 672409118ad37b6e66d1561f92e9d9a553b1452f (diff) |
Remove unwanted, undocumented and unused methods from Commands controller
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/CommandController.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/Controller/CommandController.php b/lib/Controller/CommandController.php index 68809359b..a64e2bc52 100644 --- a/lib/Controller/CommandController.php +++ b/lib/Controller/CommandController.php @@ -25,8 +25,6 @@ namespace OCA\Talk\Controller; use OCA\Talk\Model\Command; use OCA\Talk\Service\CommandService; -use OCP\AppFramework\Db\DoesNotExistException; -use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\IRequest; @@ -60,39 +58,4 @@ class CommandController extends OCSController { return new DataResponse($result); } - - /** - * @param int $id - * @param int $response - * @param int $enabled - * @return DataResponse - */ - public function update(int $id, int $response, int $enabled): DataResponse { - try { - $command = $this->commandService->updateFromWeb($id, $response, $enabled); - } catch (DoesNotExistException $e) { - return new DataResponse([], Http::STATUS_NOT_FOUND); - } catch (\InvalidArgumentException $e) { - return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST); - } - - return new DataResponse($command->asArray()); - } - - /** - * @param int $id - * @return DataResponse - */ - public function destroy(int $id): DataResponse { - try { - $this->commandService->delete($id); - } catch (DoesNotExistException $e) { - return new DataResponse([], Http::STATUS_NOT_FOUND); - } catch (\InvalidArgumentException $e) { - return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST); - } - - return new DataResponse(); - } - } |