Guillermo - path / staff/delete[skip ci]

This commit is contained in:
AntonyAntonio 2016-12-07 02:06:50 -03:00
parent 1a3adfe418
commit 60211c2b3c

View File

@ -1,5 +1,6 @@
<?php
use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
class DeleteStaffController extends Controller {
const PATH = '/delete';
@ -7,12 +8,20 @@ class DeleteStaffController extends Controller {
public function validations() {
return [
'permission' => 'staff_3',
'requestData' => []
'requestData' => [
]
];
}
public function handler (){
public function handler() {
$staffId = Controller::request('userId');
$staff = Staff::getDataStore($staffId);
$staff->delete();
Response::respondSuccess();
}
}