Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -26,7 +26,8 @@ class _groups extends \IPS\Api\Controller
|
||||
* GET /core/groups
|
||||
* Get list of groups
|
||||
*
|
||||
* @apiparam int page Page number
|
||||
* @apiparam int page Page number
|
||||
* @apiparam int perPage Number of results per page - defaults to 25
|
||||
* @return \IPS\Api\PaginatedResponse<IPS\Member\Group>
|
||||
*/
|
||||
public function GETindex()
|
||||
@@ -37,10 +38,12 @@ class _groups extends \IPS\Api\Controller
|
||||
/* Return */
|
||||
return new \IPS\Api\PaginatedResponse(
|
||||
200,
|
||||
\IPS\Db::i()->select( '*', 'core_groups', $where, "g_id asc", NULL, NULL, NULL, \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS ),
|
||||
\IPS\Db::i()->select( '*', 'core_groups', $where, "g_id asc" ),
|
||||
isset( \IPS\Request::i()->page ) ? \IPS\Request::i()->page : 1,
|
||||
'IPS\Member\Group',
|
||||
\IPS\Db::i()->select( 'COUNT(*)', 'core_groups', $where )->first()
|
||||
\IPS\Db::i()->select( 'COUNT(*)', 'core_groups', $where )->first(),
|
||||
$this->member,
|
||||
isset( \IPS\Request::i()->perPage ) ? \IPS\Request::i()->perPage : NULL
|
||||
);
|
||||
}
|
||||
|
||||
@@ -62,7 +65,7 @@ class _groups extends \IPS\Api\Controller
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
|
||||
return new \IPS\Api\Response( 200, $group->apiOutput() );
|
||||
return new \IPS\Api\Response( 200, $group->apiOutput( $this->member ) );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
@@ -74,6 +77,7 @@ class _groups extends \IPS\Api\Controller
|
||||
* DELETE /core/groups/{id}
|
||||
* Deletes a group
|
||||
*
|
||||
* @apiclientonly
|
||||
* @param int $id ID Number
|
||||
* @throws 1C358/2 INVALID_ID The group ID does not exist
|
||||
* @return void
|
||||
|
||||
Reference in new issue
Block a user