26 lines
680 B
PHP
26 lines
680 B
PHP
<?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);
|
|
}
|
|
}
|