fix payload and improve tests

This commit is contained in:
Salvatore Giordano
2021-06-26 12:41:52 +02:00
parent 367ffe9f5d
commit 56bce0957c
2 changed files with 36 additions and 11 deletions
@@ -79,16 +79,17 @@ class GeneralApi {
queryParameters: {
'payload': jsonEncode({
'type': channelType,
'filter_conditions': filter ?? {},
if (channelId != null)
'id': channelId
else if (members != null)
'members': members,
if (sort != null) 'sort': sort,
if (filter != null) 'filter': filter,
if (pagination != null) ...pagination.toJson(),
}),
},
);
return QueryMembersResponse.fromJson(response.data);
}
}