mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fixed users response list
This commit is contained in:
@@ -9,7 +9,6 @@ use Utopia\Validator\Text;
|
||||
use Utopia\Validator\Range;
|
||||
use Utopia\Audit\Audit;
|
||||
use Utopia\Audit\Adapters\MySQL as AuditAdapter;
|
||||
use Utopia\Config\Config;
|
||||
use Appwrite\Auth\Auth;
|
||||
use Appwrite\Auth\Validator\Password;
|
||||
use Appwrite\Database\Database;
|
||||
@@ -101,7 +100,7 @@ App::get('/v1/users')
|
||||
$response->dynamic(new Document([
|
||||
'sum' => $projectDB->getSum(),
|
||||
'users' => $results
|
||||
]), Response::MODEL_FILE_LIST);
|
||||
]), Response::MODEL_USER_LIST);
|
||||
}, ['response', 'projectDB']);
|
||||
|
||||
App::get('/v1/users/:userId')
|
||||
|
||||
@@ -30,6 +30,7 @@ class Response extends UtopiaResponse
|
||||
|
||||
// Users
|
||||
const MODEL_USER = 'user';
|
||||
const MODEL_USER_LIST = 'userList';
|
||||
const MODEL_SESSION = 'session';
|
||||
const MODEL_TOKEN = 'token'; // - Missing
|
||||
|
||||
@@ -73,7 +74,7 @@ class Response extends UtopiaResponse
|
||||
->setModel(new Error())
|
||||
->setModel(new ErrorDev())
|
||||
// Lists
|
||||
->setModel(new BaseList('Users List', self::MODEL_FILE_LIST, 'users', self::MODEL_USER))
|
||||
->setModel(new BaseList('Users List', self::MODEL_USER_LIST, 'users', self::MODEL_USER))
|
||||
->setModel(new BaseList('Files List', self::MODEL_FILE_LIST, 'files', self::MODEL_FILE))
|
||||
->setModel(new BaseList('Teams List', self::MODEL_TEAM_LIST, 'teams', self::MODEL_TEAM))
|
||||
->setModel(new BaseList('Memberships List', self::MODEL_MEMBERSHIP_LIST, 'memberships', self::MODEL_MEMBERSHIP))
|
||||
|
||||
Reference in New Issue
Block a user