From f85c449ed586c7ced780423943e55bfa5abaeb0f Mon Sep 17 00:00:00 2001 From: nea Date: Sat, 22 Oct 2022 00:34:22 +0200 Subject: rudimentary config gui (again) --- src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/moe/nea/notenoughupdates/repo/RepoDownloadManager.kt') 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") -- cgit