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

37 lines
774 B
PHP
Raw Normal View History

<?php
use Respect\Validation\Validator as DataValidator;
2017-04-16 07:35:04 +02:00
/**
* @api {post} /user/list-ban Get ban list
* @apiVersion 4.8.0
2017-04-16 07:35:04 +02:00
*
* @apiName Get ban list
2017-04-16 07:35:04 +02:00
*
* @apiGroup User
*
* @apiDescription This path retrieves the list of banned emails.
2017-04-16 07:35:04 +02:00
*
* @apiPermission staff1
2017-04-16 07:35:04 +02:00
*
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);
}
}