Implement API deletes

This commit is contained in:
Joseph Cohen
2015-01-14 01:50:58 -06:00
parent 953ece00cf
commit 2d95b3832d
5 changed files with 47 additions and 1 deletions

View File

@@ -73,4 +73,18 @@ class ComponentController extends Controller
{
return $this->component->create($this->auth->user()->id, Binput::all());
}
/**
* Delete an existing component.
*
* @param int $id
*
* @return \Dingo\Api\Http\Response
*/
public function deleteComponent($id)
{
$this->component->destroy($id);
return $this->response->noContent();
}
}

View File

@@ -73,4 +73,18 @@ class IncidentController extends Controller
{
return $this->incident->update($id, Binput::all());
}
/**
* Delete an existing incident.
*
* @param int $id
*
* @return \Dingo\Api\Http\Response
*/
public function deleteIncident($id)
{
$this->incident->destroy($id);
return $this->response->noContent();
}
}

View File

@@ -72,4 +72,18 @@ class MetricController extends Controller
{
return $this->metric->update($id, Binput::all());
}
/**
* Delete an existing metric.
*
* @param int $id
*
* @return \Dingo\Api\Http\Response
*/
public function deleteMetric($id)
{
$this->metric->destroy($id);
return $this->response->noContent();
}
}