opensupports/server/controllers/user/list-ban.php

36 lines
777 B
PHP
Raw Normal View History

<?php
use Respect\Validation\Validator as DataValidator;
2017-04-16 07:35:04 +02:00
/**
2017-04-21 08:09:24 +02:00
* @api {post} /user/list-ban Retrieve the list of banned users.
2017-04-16 07:35:04 +02:00
*
2017-04-21 08:09:24 +02:00
* @apiName List-ban
2017-04-16 07:35:04 +02:00
*
* @apiGroup User
*
2017-04-21 08:09:24 +02:00
* @apiDescription This path retrieves the list of banned users.
2017-04-16 07:35:04 +02:00
*
* @apiPermission Staff level 1
*
2017-04-21 08:09:24 +02:00
* @apiUse NO_PERMISSION
*
2017-04-22 03:33:17 +02:00
* @apiSuccess {[Ban](#api-Data_Structures-ObjectBan)[]} data Array of emails banned
2017-04-16 07:35:04 +02:00
*
*/
class ListBanUserController extends Controller {
const PATH = '/list-ban';
const METHOD = 'POST';
public function validations() {
return [
'permission' => 'staff_1',
'requestData' => []
];
}
public function handler() {
$banList = Ban::getAll()->toArray();
Response::respondSuccess($banList);
}
}