Use the $request variable
This commit is contained in:
@@ -60,7 +60,7 @@ class Create extends BaseApi
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
$name = $_REQUEST['name'] ?? '';
|
||||
$name = $request['name'] ?? '';
|
||||
|
||||
if ($name == '') {
|
||||
throw new HTTPException\BadRequestException('group name not specified');
|
||||
|
||||
@@ -60,7 +60,7 @@ class Destroy extends BaseApi
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
$gid = $_REQUEST['list_id'] ?? 0;
|
||||
$gid = $request['list_id'] ?? 0;
|
||||
|
||||
// error if no gid specified
|
||||
if ($gid == 0) {
|
||||
|
||||
@@ -60,8 +60,8 @@ class Update extends BaseApi
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
$gid = $_REQUEST['list_id'] ?? 0;
|
||||
$name = $_REQUEST['name'] ?? '';
|
||||
$gid = $request['list_id'] ?? 0;
|
||||
$name = $request['name'] ?? '';
|
||||
|
||||
// error if no gid specified
|
||||
if ($gid == 0) {
|
||||
|
||||
Reference in New Issue
Block a user