@@ -23,15 +23,11 @@ |
||
| 23 | 23 | |
| 24 | 24 | namespace OCA\Deck\Service; |
| 25 | 25 | |
| 26 | -use OC\Security\CSP\ContentSecurityPolicyManager; |
|
| 27 | 26 | use OCA\Deck\Db\Attachment; |
| 28 | 27 | use OCA\Deck\StatusException; |
| 29 | 28 | use OCP\AppFramework\Http\ContentSecurityPolicy; |
| 30 | -use OCP\AppFramework\Http\EmptyContentSecurityPolicy; |
|
| 31 | 29 | use OCP\AppFramework\Http\FileDisplayResponse; |
| 32 | 30 | use OCP\AppFramework\Http\StreamResponse; |
| 33 | -use OCP\Files\Cache\IScanner; |
|
| 34 | -use OCP\Files\Folder; |
|
| 35 | 31 | use OCP\Files\IAppData; |
| 36 | 32 | use OCP\Files\IRootFolder; |
| 37 | 33 | use OCP\Files\NotFoundException; |
@@ -32,10 +32,10 @@ |
||
| 32 | 32 | use OCA\Deck\Controller\Helper\ApiHelper; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * Class BoardApiController |
|
| 36 | - * |
|
| 37 | - * @package OCA\Deck\Controller |
|
| 38 | - */ |
|
| 35 | + * Class BoardApiController |
|
| 36 | + * |
|
| 37 | + * @package OCA\Deck\Controller |
|
| 38 | + */ |
|
| 39 | 39 | class LabelApiController extends ApiController { |
| 40 | 40 | |
| 41 | 41 | private $labelService; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | private $config; |
| 41 | 41 | private $l10n; |
| 42 | 42 | |
| 43 | - public function __construct( |
|
| 43 | + public function __construct( |
|
| 44 | 44 | IL10N $l10n, |
| 45 | 45 | BoardMapper $boardMapper, |
| 46 | 46 | BoardService $boardService, |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $this->config = $config; |
| 56 | 56 | $this->boardMapper = $boardMapper; |
| 57 | 57 | $this->l10n = $l10n; |
| 58 | - } |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * @param $userId |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | return false; |
| 76 | - } |
|
| 76 | + } |
|
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * @param $title |
@@ -100,9 +100,9 @@ discard block |
||
| 100 | 100 | throw new BadRequestException('color must be provided'); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $defaultBoard = $this->boardService->create($title, $userId, $color); |
|
| 104 | - $defaultStacks = []; |
|
| 105 | - $defaultCards = []; |
|
| 103 | + $defaultBoard = $this->boardService->create($title, $userId, $color); |
|
| 104 | + $defaultStacks = []; |
|
| 105 | + $defaultCards = []; |
|
| 106 | 106 | |
| 107 | 107 | $boardId = $defaultBoard->getId(); |
| 108 | 108 | |
@@ -115,5 +115,5 @@ discard block |
||
| 115 | 115 | $defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 1'), $defaultStacks[2]->getId(), 'text', 0, $userId); |
| 116 | 116 | |
| 117 | 117 | return $defaultBoard; |
| 118 | - } |
|
| 118 | + } |
|
| 119 | 119 | } |
| 120 | 120 | \ No newline at end of file |
@@ -24,7 +24,6 @@ |
||
| 24 | 24 | namespace OCA\Deck\Controller; |
| 25 | 25 | |
| 26 | 26 | use OCP\AppFramework\ApiController; |
| 27 | - use OCP\AppFramework\Http; |
|
| 28 | 27 | use OCP\AppFramework\Http\DataResponse; |
| 29 | 28 | use OCP\IRequest; |
| 30 | 29 | use OCA\Deck\Service\CardService; |
@@ -31,10 +31,10 @@ |
||
| 31 | 31 | use OCA\Deck\Service\CardService; |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * Class BoardApiController |
|
| 35 | - * |
|
| 36 | - * @package OCA\Deck\Controller |
|
| 37 | - */ |
|
| 34 | + * Class BoardApiController |
|
| 35 | + * |
|
| 36 | + * @package OCA\Deck\Controller |
|
| 37 | + */ |
|
| 38 | 38 | class CardApiController extends ApiController { |
| 39 | 39 | private $cardService; |
| 40 | 40 | private $userId; |
@@ -23,13 +23,9 @@ |
||
| 23 | 23 | |
| 24 | 24 | namespace OCA\Deck\Db; |
| 25 | 25 | |
| 26 | -use OCP\AppFramework\Db\DoesNotExistException; |
|
| 27 | -use OCP\ICache; |
|
| 28 | 26 | use OCP\ICacheFactory; |
| 29 | 27 | use OCP\IDBConnection; |
| 30 | 28 | use OCP\IRequest; |
| 31 | -use OCP\IUserManager; |
|
| 32 | -use OCP\IGroupManager; |
|
| 33 | 29 | |
| 34 | 30 | class ChangeHelper { |
| 35 | 31 | |
@@ -31,76 +31,76 @@ |
||
| 31 | 31 | |
| 32 | 32 | class AttachmentApiController extends ApiController { |
| 33 | 33 | |
| 34 | - private $attachmentService; |
|
| 34 | + private $attachmentService; |
|
| 35 | 35 | |
| 36 | - public function __construct($appName, IRequest $request, AttachmentService $attachmentService) { |
|
| 37 | - parent::__construct($appName, $request); |
|
| 38 | - $this->attachmentService = $attachmentService; |
|
| 39 | - } |
|
| 36 | + public function __construct($appName, IRequest $request, AttachmentService $attachmentService) { |
|
| 37 | + parent::__construct($appName, $request); |
|
| 38 | + $this->attachmentService = $attachmentService; |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - /** |
|
| 41 | + /** |
|
| 42 | 42 | * @NoAdminRequired |
| 43 | 43 | * @CORS |
| 44 | 44 | * @NoCSRFRequired |
| 45 | 45 | * |
| 46 | 46 | */ |
| 47 | - public function getAll() { |
|
| 48 | - $attachment = $this->attachmentService->findAll($this->request->getParam('cardId')); |
|
| 49 | - return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 50 | - } |
|
| 47 | + public function getAll() { |
|
| 48 | + $attachment = $this->attachmentService->findAll($this->request->getParam('cardId')); |
|
| 49 | + return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - /** |
|
| 52 | + /** |
|
| 53 | 53 | * @NoAdminRequired |
| 54 | 54 | * @CORS |
| 55 | 55 | * @NoCSRFRequired |
| 56 | 56 | * |
| 57 | 57 | */ |
| 58 | - public function display() { |
|
| 59 | - $attachment = $this->attachmentService->display($this->request->getParam('cardId'), $this->request->getParam('attachmentId')); |
|
| 58 | + public function display() { |
|
| 59 | + $attachment = $this->attachmentService->display($this->request->getParam('cardId'), $this->request->getParam('attachmentId')); |
|
| 60 | 60 | return $attachment; |
| 61 | - } |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - /** |
|
| 63 | + /** |
|
| 64 | 64 | * @NoAdminRequired |
| 65 | 65 | * @CORS |
| 66 | 66 | * @NoCSRFRequired |
| 67 | 67 | * |
| 68 | 68 | */ |
| 69 | - public function create($type, $data) { |
|
| 70 | - $attachment = $this->attachmentService->create($this->request->getParam('cardId'), $type, $data); |
|
| 71 | - return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 72 | - } |
|
| 69 | + public function create($type, $data) { |
|
| 70 | + $attachment = $this->attachmentService->create($this->request->getParam('cardId'), $type, $data); |
|
| 71 | + return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 72 | + } |
|
| 73 | 73 | |
| 74 | - /** |
|
| 74 | + /** |
|
| 75 | 75 | * @NoAdminRequired |
| 76 | 76 | * @CORS |
| 77 | 77 | * @NoCSRFRequired |
| 78 | 78 | * |
| 79 | 79 | */ |
| 80 | - public function update($data) { |
|
| 81 | - $attachment = $this->attachmentService->update($this->request->getParam('cardId'), $this->request->getParam('attachmentId'), $data); |
|
| 82 | - return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 83 | - } |
|
| 80 | + public function update($data) { |
|
| 81 | + $attachment = $this->attachmentService->update($this->request->getParam('cardId'), $this->request->getParam('attachmentId'), $data); |
|
| 82 | + return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 83 | + } |
|
| 84 | 84 | |
| 85 | - /** |
|
| 85 | + /** |
|
| 86 | 86 | * @NoAdminRequired |
| 87 | 87 | * @CORS |
| 88 | 88 | * @NoCSRFRequired |
| 89 | 89 | * |
| 90 | 90 | */ |
| 91 | - public function delete() { |
|
| 92 | - $attachment = $this->attachmentService->delete($this->request->getParam('cardId'), $this->request->getParam('attachmentId')); |
|
| 93 | - return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 94 | - } |
|
| 91 | + public function delete() { |
|
| 92 | + $attachment = $this->attachmentService->delete($this->request->getParam('cardId'), $this->request->getParam('attachmentId')); |
|
| 93 | + return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | - /** |
|
| 96 | + /** |
|
| 97 | 97 | * @NoAdminRequired |
| 98 | 98 | * @CORS |
| 99 | 99 | * @NoCSRFRequired |
| 100 | 100 | * |
| 101 | 101 | */ |
| 102 | - public function restore() { |
|
| 103 | - $attachment = $this->attachmentService->restore($this->request->getParam('cardId'), $this->request->getParam('attachmentId')); |
|
| 104 | - return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 105 | - } |
|
| 102 | + public function restore() { |
|
| 103 | + $attachment = $this->attachmentService->restore($this->request->getParam('cardId'), $this->request->getParam('attachmentId')); |
|
| 104 | + return new DataResponse($attachment, HTTP::STATUS_OK); |
|
| 105 | + } |
|
| 106 | 106 | } |
| 107 | 107 | \ No newline at end of file |
@@ -23,16 +23,13 @@ |
||
| 23 | 23 | |
| 24 | 24 | namespace OCA\Deck\Controller; |
| 25 | 25 | |
| 26 | -use OCA\Deck\Service\DefaultBoardService; |
|
| 27 | 26 | use OCP\AppFramework\Http\DataResponse; |
| 28 | 27 | use OCP\AppFramework\Http\NotFoundResponse; |
| 29 | 28 | use OCP\IConfig; |
| 30 | 29 | use OCP\IGroup; |
| 31 | 30 | use OCP\IGroupManager; |
| 32 | 31 | use OCP\IRequest; |
| 33 | -use OCP\AppFramework\Http\TemplateResponse; |
|
| 34 | 32 | use OCP\AppFramework\Controller; |
| 35 | -use OCP\IL10N; |
|
| 36 | 33 | |
| 37 | 34 | class ConfigController extends Controller { |
| 38 | 35 | |
@@ -26,10 +26,8 @@ |
||
| 26 | 26 | |
| 27 | 27 | use OCA\Deck\StatusException; |
| 28 | 28 | use OCP\AppFramework\ApiController; |
| 29 | -use OCP\AppFramework\Http; |
|
| 30 | 29 | use OCP\AppFramework\Http\DataResponse; |
| 31 | 30 | use OCP\IRequest; |
| 32 | - |
|
| 33 | 31 | use OCA\Deck\Service\BoardService; |
| 34 | 32 | use Sabre\HTTP\Util; |
| 35 | 33 | |
@@ -44,7 +44,6 @@ |
||
| 44 | 44 | use OCP\FullTextSearch\Model\ISearchResult; |
| 45 | 45 | use OCP\FullTextSearch\Model\ISearchTemplate; |
| 46 | 46 | use OCP\IL10N; |
| 47 | -use OCP\IURLGenerator; |
|
| 48 | 47 | |
| 49 | 48 | |
| 50 | 49 | /** |