diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 022caf641a..47b8c1b0cb 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -11,7 +11,7 @@ use Appwrite\Network\Validator\Host; use Appwrite\Template\Template; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries; -use Appwrite\Utopia\Database\Validator\Queries\TeamMemberships; +use Appwrite\Utopia\Database\Validator\Queries\Memberships; use Appwrite\Utopia\Database\Validator\Queries\Teams; use Appwrite\Utopia\Database\Validator\Query\Limit; use Appwrite\Utopia\Database\Validator\Query\Offset; @@ -466,7 +466,7 @@ App::get('/v1/teams/:teamId/memberships') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP_LIST) ->param('teamId', '', new UID(), 'Team ID.') - ->param('queries', [], new TeamMemberships(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', TeamMemberships::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], new Memberships(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Memberships::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/TeamMemberships.php b/src/Appwrite/Utopia/Database/Validator/Queries/Memberships.php similarity index 92% rename from src/Appwrite/Utopia/Database/Validator/Queries/TeamMemberships.php rename to src/Appwrite/Utopia/Database/Validator/Queries/Memberships.php index 5a29e3b63e..2d90eeb0e6 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/TeamMemberships.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Memberships.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Database\Validator\Queries; use Appwrite\Utopia\Database\Validator\Queries\Base; -class TeamMemberships extends Base +class Memberships extends Base { public const ALLOWED_ATTRIBUTES = [ 'userId',