Check for archived cards before action in backend
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\ApiController as BaseApiController;
|
||||
|
||||
class ApiController extends BaseApiController {
|
||||
public function __construct($appName,
|
||||
IRequest $request){
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
/**
|
||||
* @PublicPage
|
||||
* @NoCSRFRequired
|
||||
* @CORS
|
||||
*/
|
||||
public function index() {
|
||||
return [
|
||||
'apiLevels' => ['v1']
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
// TODO: Implement LATER
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCA\Deck\Service\BoardService;
|
||||
|
||||
use OCP\IRequest;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
|
||||
use OCP\AppFramework\ApiController as BaseApiController;
|
||||
|
||||
class BoardApiController extends BaseApiController {
|
||||
private $userId;
|
||||
public function __construct($appName,
|
||||
IRequest $request,
|
||||
BoardService $cardService,
|
||||
$userId){
|
||||
parent::__construct($appName, $request);
|
||||
$this->userId = $userId;
|
||||
$this->boardService = $cardService;
|
||||
}
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @CORS
|
||||
*/
|
||||
public function index() {
|
||||
return new DataResponse($this->boardService->findAll($this->userId));
|
||||
}
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @CORS
|
||||
*/
|
||||
public function create($title, $color) {
|
||||
return new DataResponse($this->boardService->create($title, $this->userId, $color));
|
||||
}
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @CORS
|
||||
*/
|
||||
public function update($id, $title, $color) {
|
||||
return new DataResponse($this->boardService->create($title, $this->userId, $color));
|
||||
}
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @CORS
|
||||
*/
|
||||
public function delete($id) {
|
||||
return new DataResponse($this->boardService->create($title, $this->userId, $color));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user