diff options
author | nea <romangraef@gmail.com> | 2022-10-22 00:34:22 +0200 |
---|---|---|
committer | nea <romangraef@gmail.com> | 2022-10-22 00:34:22 +0200 |
commit | f85c449ed586c7ced780423943e55bfa5abaeb0f (patch) | |
tree | 0c5f59c73cc9e5fcb07de6e3f1f102e2413def27 /src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt | |
parent | c98d4693f1fc9dcae8d78cb33e6233629f4cb2e7 (diff) | |
download | firmament-f85c449ed586c7ced780423943e55bfa5abaeb0f.tar.gz firmament-f85c449ed586c7ced780423943e55bfa5abaeb0f.tar.bz2 firmament-f85c449ed586c7ced780423943e55bfa5abaeb0f.zip |
rudimentary config gui (again)
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt b/src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt index 2d700c1..34b49e7 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt @@ -50,7 +50,7 @@ object RepoDownloadManager { private suspend fun requestLatestGithubSha(): String? { val response = - NotEnoughUpdates.httpClient.get("https://api.github.com/repos/${RepoManager.config.user}/${RepoManager.config.repo}/commits/${RepoManager.config.branch}") + NotEnoughUpdates.httpClient.get("https://api.github.com/repos/${RepoManager.data.user}/${RepoManager.data.repo}/commits/${RepoManager.data.branch}") if (response.status.value != 200) { return null } @@ -77,7 +77,7 @@ object RepoDownloadManager { } val currentSha = loadSavedVersionHash() if (latestSha != currentSha || force) { - val requestUrl = "https://github.com/${RepoManager.config.user}/${RepoManager.config.repo}/archive/$latestSha.zip" + val requestUrl = "https://github.com/${RepoManager.data.user}/${RepoManager.data.repo}/archive/$latestSha.zip" logger.info("Planning to upgrade repository from $currentSha to $latestSha from $requestUrl") val zipFile = downloadGithubArchive(requestUrl) logger.info("Download repository zip file to $zipFile. Deleting old repository") |