summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-26 08:47:52 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-26 08:47:52 -0400
commitb584285ddcc38586894d0044d7d6d8a5a974c473 (patch)
tree96d8d1db7d66e8e24c121ee23215742944f90685 /app
parentf2cce5ade869420bb73d5af2ad17907b1c3bb3da (diff)
Remove webhook endpoint to create tasks (breaking change)
Diffstat (limited to 'app')
-rw-r--r--app/Controller/Webhook.php42
-rw-r--r--app/Template/config/webhook.php6
2 files changed, 1 insertions, 47 deletions
diff --git a/app/Controller/Webhook.php b/app/Controller/Webhook.php
deleted file mode 100644
index 6e172aeb..00000000
--- a/app/Controller/Webhook.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-namespace Kanboard\Controller;
-
-/**
- * Webhook controller
- *
- * @package controller
- * @author Frederic Guillot
- */
-class Webhook extends BaseController
-{
- /**
- * Webhook to create a task
- *
- * @access public
- */
- public function task()
- {
- $this->checkWebhookToken();
-
- $defaultProject = $this->project->getFirst();
-
- $values = array(
- 'title' => $this->request->getStringParam('title'),
- 'description' => $this->request->getStringParam('description'),
- 'color_id' => $this->request->getStringParam('color_id'),
- 'project_id' => $this->request->getIntegerParam('project_id', $defaultProject['id']),
- 'owner_id' => $this->request->getIntegerParam('owner_id'),
- 'column_id' => $this->request->getIntegerParam('column_id'),
- 'category_id' => $this->request->getIntegerParam('category_id'),
- );
-
- list($valid, ) = $this->taskValidator->validateCreation($values);
-
- if ($valid && $this->taskCreation->create($values)) {
- return $this->response->text('OK');
- }
-
- return $this->response->text('FAILED');
- }
-}
diff --git a/app/Template/config/webhook.php b/app/Template/config/webhook.php
index 5db1fa6e..3bba907c 100644
--- a/app/Template/config/webhook.php
+++ b/app/Template/config/webhook.php
@@ -16,7 +16,7 @@
</section>
<div class="page-header">
- <h2><?= t('URL and token') ?></h2>
+ <h2><?= t('Webhook token') ?></h2>
</div>
<section class="listing">
<ul>
@@ -25,10 +25,6 @@
<strong><?= $this->text->e($values['webhook_token']) ?></strong>
</li>
<li>
- <?= t('URL for task creation:') ?>
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'task', array('token' => $values['webhook_token']), false, '', true) ?>">
- </li>
- <li>
<?= $this->url->link(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?>
</li>
</ul>