2016-10-03 21:44:41 +02:00
|
|
|
<?php
|
|
|
|
use Respect\Validation\Validator as DataValidator;
|
|
|
|
DataValidator::with('CustomValidations', true);
|
|
|
|
|
2017-04-17 04:59:11 +02:00
|
|
|
/**
|
|
|
|
* @api {post} /ticket/get-custom-responses give back customs responses.
|
|
|
|
*
|
|
|
|
* @apiName Get custom responses
|
|
|
|
*
|
|
|
|
* @apiGroup Ticket
|
|
|
|
*
|
|
|
|
* @apiDescription This path give back custom responses.
|
|
|
|
*
|
|
|
|
* @apiPermission Staff level 1
|
|
|
|
*
|
|
|
|
* @apiSuccess {Object} data
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2016-10-03 21:44:41 +02:00
|
|
|
class GetCustomResponsesController extends Controller {
|
|
|
|
const PATH = '/get-custom-responses';
|
2017-02-08 19:09:15 +01:00
|
|
|
const METHOD = 'POST';
|
2016-10-03 21:44:41 +02:00
|
|
|
|
|
|
|
public function validations() {
|
|
|
|
return [
|
|
|
|
'permission' => 'staff_1',
|
|
|
|
'requestData' => []
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function handler() {
|
|
|
|
$customResponsesList = CustomResponse::getAll();
|
|
|
|
|
|
|
|
Response::respondSuccess($customResponsesList->toArray());
|
|
|
|
}
|
|
|
|
}
|