Guillermo Giuliana 6a34c24d7d
update script and change 4.6 to 4.7 (#809)
* update script and change 4.6 to 4.7

* fix 4.7.0 script
2020-06-16 21:26:04 -03:00

38 lines
785 B
PHP
Executable File

<?php
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-api-keys Get APIKeys
* @apiVersion 4.7.0
*
* @apiName Get APIKeys
*
* @apiGroup System
*
* @apiDescription This path retrieves the all APIKeys.
*
* @apiPermission staff3
*
* @apiUse NO_PERMISSION
*
* @apiSuccess {[APIKey](#api-Data_Structures-ObjectApikey)[]} data Array of APIKeys
*
*/
class GetAPIKeysController extends Controller {
const PATH = '/get-api-keys';
const METHOD = 'POST';
public function validations() {
return [
'permission' => 'staff_3',
'requestData' => []
];
}
public function handler() {
$apiList = APIKey::getAll();
Response::respondSuccess($apiList->toArray());
}
}