2017-01-13 19:50:35 +01:00
|
|
|
<?php
|
|
|
|
use Respect\Validation\Validator as DataValidator;
|
|
|
|
|
2017-04-18 02:09:16 +02:00
|
|
|
/**
|
2017-04-21 08:09:24 +02:00
|
|
|
* @api {post} /system/get-api-keys Retrieve api keys.
|
2017-04-18 02:09:16 +02:00
|
|
|
*
|
|
|
|
* @apiName Get api keys
|
|
|
|
*
|
|
|
|
* @apiGroup system
|
|
|
|
*
|
2017-04-21 08:09:24 +02:00
|
|
|
* @apiDescription This path retrieves the all api keys.
|
2017-04-18 02:09:16 +02:00
|
|
|
*
|
|
|
|
* @apiPermission Staff level 3
|
|
|
|
*
|
2017-04-21 08:09:24 +02:00
|
|
|
* @apiUse NO_PERMISSION
|
|
|
|
*
|
2017-04-22 03:33:17 +02:00
|
|
|
* @apiSuccess {[APIKey](#api-Data_Structures-ObjectApikey)[]} data Array of api keys
|
2017-04-18 02:09:16 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-02-24 07:56:25 +01:00
|
|
|
class GetAPIKeysController extends Controller {
|
|
|
|
const PATH = '/get-api-keys';
|
2017-02-08 19:09:15 +01:00
|
|
|
const METHOD = 'POST';
|
2017-01-13 19:50:35 +01:00
|
|
|
|
|
|
|
public function validations() {
|
|
|
|
return [
|
|
|
|
'permission' => 'staff_3',
|
|
|
|
'requestData' => []
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function handler() {
|
|
|
|
$apiList = APIKey::getAll();
|
|
|
|
|
|
|
|
Response::respondSuccess($apiList->toArray());
|
|
|
|
}
|
|
|
|
}
|