1
0
Fork 0
mirror of synced 2024-07-06 23:21:05 +12:00

Fix users queries phone -> number

This commit is contained in:
Jake Barnby 2022-09-22 13:57:31 +12:00
parent a2778e410f
commit 734561c6b6
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
2 changed files with 7 additions and 7 deletions

View file

@ -553,8 +553,8 @@ trait GraphQLBase
}
}';
case self::$GET_USERS:
return 'query listUsers($search: String, $limit: Int, $offset: Int, $cursor: String, $cursorDirection: String, $orderType: String) {
usersList(search: $search, limit: $limit, offset: $offset, cursor: $cursor, cursorDirection: $cursorDirection, orderType: $orderType) {
return 'query listUsers($search: String, $queries: [String!]) {
usersList(search: $search, queries: $queries) {
total
users {
_id
@ -619,8 +619,8 @@ trait GraphQLBase
}
}';
case self::$UPDATE_USER_PHONE:
return 'mutation updateUserPhone($userId: String!, $phone: String!){
usersUpdatePhone(userId: $userId, phone: $phone) {
return 'mutation updateUserPhone($userId: String!, $number: String!){
usersUpdatePhone(userId: $userId, number: $number) {
name
phone
email

View file

@ -128,7 +128,7 @@ class GraphQLUsersTest extends Scope
$this->assertIsArray($user['body']['data']);
$this->assertArrayNotHasKey('errors', $user['body']);
$this->assertIsArray($user['body']['data']['usersGetSessions']);
$this->assertIsArray($user['body']['data']['usersListSessions']);
}
public function testGetUserMemberships()
@ -317,7 +317,7 @@ class GraphQLUsersTest extends Scope
'query' => $query,
'variables' => [
'userId' => $this->getUser()['$id'],
'phone' => '+123456789'
'number' => '+123456789'
],
];
@ -329,7 +329,7 @@ class GraphQLUsersTest extends Scope
$this->assertIsArray($user['body']['data']);
$this->assertArrayNotHasKey('errors', $user['body']);
$this->assertIsArray($user['body']['data']['usersUpdatePhone']);
$this->assertEquals('+123456789', $user['body']['data']['usersUpdatePhone']['phone']);
$this->assertEquals('+123456789', $user['body']['data']['usersUpdatePhone']['number']);
}
public function testUpdateUserPrefs()