Implement API deletes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user