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
|
|
|
/**
|
2017-05-12 06:58:40 +02:00
|
|
|
* @api {post} /ticket/get-custom-responses Get custom responses
|
|
|
|
* @apiVersion 4.0.0
|
2017-04-17 04:59:11 +02:00
|
|
|
*
|
|
|
|
* @apiName Get custom responses
|
|
|
|
*
|
|
|
|
* @apiGroup Ticket
|
|
|
|
*
|
2017-05-12 06:58:40 +02:00
|
|
|
* @apiDescription This path returns all the custom responses.
|
2017-04-17 04:59:11 +02:00
|
|
|
*
|
2017-05-12 06:58:40 +02:00
|
|
|
* @apiPermission staff1
|
2017-04-17 04:59:11 +02:00
|
|
|
*
|
2017-04-21 08:09:24 +02:00
|
|
|
* @apiUse NO_PERMISSION
|
|
|
|
*
|
2017-04-21 05:34:20 +02:00
|
|
|
* @apiSuccess {[CustomResponse](#api-Data_Structures-ObjectCustomresponse)[]} data List of custom responses.
|
2017-04-17 04:59:11 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
}
|