mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Fixed updater
This commit is contained in:
parent
33840c2c90
commit
71853d678a
8 changed files with 131 additions and 87 deletions
|
@ -2204,7 +2204,7 @@ class ApiClient {
|
|||
Future checkAppUpdatesGitHub() async {
|
||||
try {
|
||||
HttpClient httpClient = HttpClient();
|
||||
HttpClientRequest request = await httpClient.getUrl(Uri.parse(Urls.checkLatestReleaseUrl));
|
||||
HttpClientRequest request = await httpClient.getUrl(Uri.parse(Urls.getReleasesGitHub));
|
||||
HttpClientResponse response = await request.close();
|
||||
String reply = await response.transform(utf8.decoder).join();
|
||||
httpClient.close();
|
||||
|
@ -2214,7 +2214,7 @@ Future checkAppUpdatesGitHub() async {
|
|||
'hasResponse': true,
|
||||
'error': false,
|
||||
'statusCode': response.statusCode,
|
||||
'body': GitHubRelease.fromJson(jsonDecode(reply))
|
||||
'body': List<GitHubRelease>.from(jsonDecode(reply).map((entry) => GitHubRelease.fromJson(entry)))
|
||||
};
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue