Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-06-15 17:33:15 +0300
committerdartcafe <github@dartcafe.de>2020-06-15 17:33:15 +0300
commit4632557dde1e437da3768e2baf1166d3056a3315 (patch)
tree2367f45b6effc3f1096a9e352b533b84ade36ea4 /lib/Controller
parent464e91b444b6af9f3fa10906cfb32576c87deb8f (diff)
fixes and tidy
Diffstat (limited to 'lib/Controller')
-rw-r--r--lib/Controller/OptionApiController.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Controller/OptionApiController.php b/lib/Controller/OptionApiController.php
index d6890c31..ded3933e 100644
--- a/lib/Controller/OptionApiController.php
+++ b/lib/Controller/OptionApiController.php
@@ -24,15 +24,15 @@
namespace OCA\Polls\Controller;
use Exception;
-use OCP\AppFramework\Db\DoesNotExistException;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
+use OCP\AppFramework\Db\DoesNotExistException;
+use OCA\Polls\Exceptions\NotAuthorizedException;
use OCP\IRequest;
use OCP\AppFramework\ApiController;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
-use OCA\Polls\Exceptions\NotAuthorizedException;
use OCA\Polls\Service\OptionService;
@@ -134,8 +134,7 @@ class OptionApiController extends ApiController {
*/
public function delete($optionId) {
try {
- $this->optionService->delete($optionId);
- return new DataResponse($optionId, Http::STATUS_OK);
+ return new DataResponse($this->optionService->delete($optionId), Http::STATUS_OK);
} catch (NotAuthorizedException $e) {
return new DataResponse('Unauthorized', Http::STATUS_FORBIDDEN);
} catch (DoesNotExistException $e) {