Fix
This commit is contained in:
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace OCA\Deckflow\Controller;
|
||||
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\IRequest;
|
||||
use OCP\IUserSession;
|
||||
use OCA\Deckflow\Service\WorkflowService;
|
||||
|
||||
class SettingsController extends Controller {
|
||||
|
||||
private $workflowService;
|
||||
|
||||
public function __construct(IRequest $request, IUserSession $userSession, WorkflowService $workflowService) {
|
||||
parent::__construct('deckflow', $request);
|
||||
$this->workflowService = $workflowService;
|
||||
}
|
||||
|
||||
public function showSettingsForm() {
|
||||
$workflows = $this->workflowService->getWorkflows();
|
||||
return $this->render('settings.php', [
|
||||
'workflows' => $workflows
|
||||
]);
|
||||
}
|
||||
|
||||
public function saveWorkflows() {
|
||||
$deckId = $_POST['deckId'];
|
||||
$sourceStackId = $_POST['sourceStack'];
|
||||
$targetStackId = $_POST['targetStack'];
|
||||
|
||||
$this->workflowService->saveWorkflows($deckId, $sourceStackId, $targetStackId);
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace OCA\Deckflow\Controller;
|
||||
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\IRequest;
|
||||
use OCA\Deckflow\Service\WorkflowService;
|
||||
|
||||
class WebhookController extends Controller {
|
||||
|
||||
private $workflowService;
|
||||
|
||||
public function __construct(IRequest $request, WorkflowService $workflowService) {
|
||||
parent::__construct('deckflow', $request);
|
||||
$this->workflowService = $workflowService;
|
||||
}
|
||||
|
||||
public function moveCards() {
|
||||
$deckId = $_POST['deckId'];
|
||||
$sourceStackId = $_POST['sourceStackId'];
|
||||
$targetStackId = $_POST['targetStackId'];
|
||||
|
||||
$this->workflowService->moveOverdueCards($deckId, $sourceStackId, $targetStackId);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user