diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index 3ca9ea598a..1443ce07c7 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -253,7 +253,7 @@ App::post('/v1/messaging/providers/resend') ) ] )) - ->param('providerId', '', new CustomId(), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('providerId', '', fn (Database $dbForProject) => new CustomId(false, $dbForProject->getAdapter()->getMaxUIDLength()), 'Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', false, ['dbForProject']) ->param('name', '', new Text(128), 'Provider name.') ->param('apiKey', '', new Text(0), 'Resend API key.', true) ->param('fromName', '', new Text(128, 0), 'Sender Name.', true) @@ -1478,7 +1478,7 @@ App::patch('/v1/messaging/providers/resend/:providerId') ) ] )) - ->param('providerId', '', new UID(), 'Provider ID.') + ->param('providerId', '', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Provider ID.', false, ['dbForProject']) ->param('name', '', new Text(128), 'Provider name.', true) ->param('enabled', null, new Nullable(new Boolean()), 'Set as enabled.', true) ->param('apiKey', '', new Text(0), 'Resend API key.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php index a89155735a..5762c171dc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php @@ -56,9 +56,9 @@ class XList extends AttributesXList ->callback($this->action(...)); } - public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject): void + public function action(string $databaseId, string $tableId, array $queries, bool $includeTotal, UtopiaResponse $response, Database $dbForProject): void { // Call parent action with tableId as collectionId since they refer to the same resource - parent::action($databaseId, $tableId, $queries, $response, $dbForProject); + parent::action($databaseId, $tableId, $queries, $includeTotal, $response, $dbForProject); } }