1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00

Merge pull request #2951 from appwrite/fix-user-search

fix: user search
This commit is contained in:
Torsten Dittmann 2022-03-15 19:14:47 +01:00 committed by GitHub
commit 26bad27bb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 18 deletions

37
composer.lock generated
View file

@ -236,16 +236,16 @@
},
{
"name": "chillerlan/php-settings-container",
"version": "2.1.2",
"version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-settings-container.git",
"reference": "ec834493a88682dd69652a1eeaf462789ed0c5f5"
"reference": "125dd573b45ffc7cabecf385986a356ba2c6f602"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/ec834493a88682dd69652a1eeaf462789ed0c5f5",
"reference": "ec834493a88682dd69652a1eeaf462789ed0c5f5",
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/125dd573b45ffc7cabecf385986a356ba2c6f602",
"reference": "125dd573b45ffc7cabecf385986a356ba2c6f602",
"shasum": ""
},
"require": {
@ -253,7 +253,7 @@
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phan/phan": "^4.0",
"phan/phan": "^5.3",
"phpunit/phpunit": "^9.5"
},
"type": "library",
@ -278,6 +278,7 @@
"keywords": [
"PHP7",
"Settings",
"configuration",
"container",
"helper"
],
@ -295,7 +296,7 @@
"type": "ko_fi"
}
],
"time": "2021-09-06T15:17:01+00:00"
"time": "2022-03-09T13:18:58+00:00"
},
{
"name": "colinmollenhour/credis",
@ -2129,16 +2130,16 @@
},
{
"name": "utopia-php/database",
"version": "0.15.3",
"version": "0.15.4",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "726e3b04fb1f1b3b654bc1d3114deaf1481cb008"
"reference": "166365d9c39c4d70b1267af4562f4327e8930f79"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/726e3b04fb1f1b3b654bc1d3114deaf1481cb008",
"reference": "726e3b04fb1f1b3b654bc1d3114deaf1481cb008",
"url": "https://api.github.com/repos/utopia-php/database/zipball/166365d9c39c4d70b1267af4562f4327e8930f79",
"reference": "166365d9c39c4d70b1267af4562f4327e8930f79",
"shasum": ""
},
"require": {
@ -2186,9 +2187,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.15.3"
"source": "https://github.com/utopia-php/database/tree/0.15.4"
},
"time": "2022-03-07T11:59:51+00:00"
"time": "2022-03-15T17:20:14+00:00"
},
{
"name": "utopia-php/domains",
@ -3191,16 +3192,16 @@
},
{
"name": "composer/semver",
"version": "3.2.9",
"version": "3.3.0",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649"
"reference": "f79c90ad4e9b41ac4dfc5d77bf398cf61fbd718b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/a951f614bd64dcd26137bc9b7b2637ddcfc57649",
"reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649",
"url": "https://api.github.com/repos/composer/semver/zipball/f79c90ad4e9b41ac4dfc5d77bf398cf61fbd718b",
"reference": "f79c90ad4e9b41ac4dfc5d77bf398cf61fbd718b",
"shasum": ""
},
"require": {
@ -3252,7 +3253,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.2.9"
"source": "https://github.com/composer/semver/tree/3.3.0"
},
"funding": [
{
@ -3268,7 +3269,7 @@
"type": "tidelift"
}
],
"time": "2022-02-04T13:58:43+00:00"
"time": "2022-03-15T08:35:57+00:00"
},
{
"name": "composer/xdebug-handler",

View file

@ -121,6 +121,18 @@ trait UsersBase
$this->assertCount(1, $response['body']['users']);
$this->assertEquals($response['body']['users'][0]['$id'], $data['userId']);
$response = $this->client->call(Client::METHOD_GET, '/users', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'search' => 'cristiano.ronaldo@manchester-united.co.uk'
]);
$this->assertEquals($response['headers']['status-code'], 200);
$this->assertNotEmpty($response['body']);
$this->assertNotEmpty($response['body']['users']);
$this->assertCount(1, $response['body']['users']);
$this->assertEquals($response['body']['users'][0]['$id'], $data['userId']);
$response = $this->client->call(Client::METHOD_GET, '/users', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],