Remove webhook endpoint to create tasks (breaking change)

This commit is contained in:
Frederic Guillot
2016-05-26 08:47:52 -04:00
parent f2cce5ade8
commit b584285ddc
4 changed files with 5 additions and 80 deletions

View File

@@ -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');
}
}