fix(gitea): keep original query params as is

This commit is contained in:
Rongjian Zhang 2020-10-06 12:12:57 +08:00
parent f9351533c7
commit aa62524c23
1 changed files with 7 additions and 2 deletions

View File

@ -238,8 +238,13 @@ class AuthModel with ChangeNotifier {
page = page ?? 1;
limit = limit ?? pageSize;
final uri = Uri.parse('${activeAccount.domain}/api/v1$path').replace(
queryParameters: {'page': page.toString(), 'limit': limit.toString()},
var uri = Uri.parse('${activeAccount.domain}/api/v1$path');
uri = uri.replace(
queryParameters: {
'page': page.toString(),
'limit': limit.toString(),
...uri.queryParameters,
},
);
final res = await http.get(uri, headers: {'Authorization': 'token $token'});
final info = json.decode(utf8.decode(res.bodyBytes));