Commit new state
This commit is contained in:
@@ -51,8 +51,8 @@ class CardController extends Controller {
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function update($id, $title, $stackId, $type, $order) {
|
||||
return $this->cardService->update($id, $title, $stackId, $type, $order, $this->userId);
|
||||
public function update($id, $title, $stackId, $type, $order, $description) {
|
||||
return $this->cardService->update($id, $title, $stackId, $type, $order, $description, $this->userId);
|
||||
}
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
@@ -60,6 +60,17 @@ class CardController extends Controller {
|
||||
public function delete($cardId) {
|
||||
return $this->cardService->delete($this->userId, $cardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function assignLabel($cardId, $labelId) {
|
||||
return $this->cardService->assignLabel($this->userId, $cardId, $labelId);
|
||||
}
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function removeLabel($cardId, $labelId) {
|
||||
return $this->cardService->removeLabel($this->userId, $cardId, $labelId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
43
controller/labelcontroller.php
Normal file
43
controller/labelcontroller.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Service\LabelService;
|
||||
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
|
||||
class LabelController extends Controller {
|
||||
private $userId;
|
||||
private $labelService;
|
||||
public function __construct($appName,
|
||||
IRequest $request,
|
||||
LabelService $labelService,
|
||||
$userId){
|
||||
parent::__construct($appName, $request);
|
||||
$this->userId = $userId;
|
||||
$this->labelService = $labelService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function create($title, $color, $boardId) {
|
||||
return $this->labelService->create($title, $this->userId, $color, $boardId);
|
||||
}
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function update($id, $title, $color) {
|
||||
return $this->labelService->update($id, $title, $this->userId, $color);
|
||||
}
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function delete($labelId) {
|
||||
return $this->labelService->delete($this->userId, $labelId);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user