1
0
Fork 0
mirror of synced 2024-10-01 01:37:56 +13:00

Merge pull request #7381 from appwrite/fix-list-messages-allowed-queries

Fix list messages allowed queries
This commit is contained in:
Jake Barnby 2024-01-19 16:53:22 +13:00 committed by GitHub
commit fc9cc3aab1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 8 deletions

View file

@ -2537,7 +2537,7 @@ App::get('/v1/messaging/messages')
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_MESSAGE_LIST)
->param('queries', [], new Messages(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). 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(', ', Providers::ALLOWED_ATTRIBUTES), true)
->param('queries', [], new Messages(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). 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(', ', Messages::ALLOWED_ATTRIBUTES), true)
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->inject('dbForProject')
->inject('response')

View file

@ -5,16 +5,12 @@ namespace Appwrite\Utopia\Database\Validator\Queries;
class Messages extends Base
{
public const ALLOWED_ATTRIBUTES = [
'topics',
'users',
'targets',
'providerId',
'scheduledAt',
'deliveredAt',
'deliveredTo',
'deliveryErrors',
'deliveredTotal',
'status',
'description',
'data'
'providerType',
];
/**