labelService->find($this->request->getParam('labelId')); return new DataResponse($label, HTTP::STATUS_OK); } /** * @NoAdminRequired * @CORS * @NoCSRFRequired * * @params $title * @params $color * @param array $customSettings * * Create a new label */ public function create($title, $color, array $customSettings = []) { $label = $this->labelService->create($title, $color, $this->request->getParam('boardId'), $customSettings); return new DataResponse($label, HTTP::STATUS_OK); } /** * @NoAdminRequired * @CORS * @NoCSRFRequired * * @params $title * @params $color * @param array $customSettings * * Update a specific label */ public function update($title, $color, array $customSettings = []) { $label = $this->labelService->update($this->request->getParam('labelId'), $title, $color, $customSettings); return new DataResponse($label, HTTP::STATUS_OK); } /** * @NoAdminRequired * @CORS * @NoCSRFRequired * * Delete a specific label */ public function delete() { $label = $this->labelService->delete($this->request->getParam('labelId')); return new DataResponse($label, HTTP::STATUS_OK); } }