Fix users queries phone -> number
This commit is contained in:
parent
a2778e410f
commit
734561c6b6
2 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue