diff --git a/app/src/main/java/com/topjohnwu/magisk/core/data/NetworkServices.kt b/app/src/main/java/com/topjohnwu/magisk/core/data/NetworkServices.kt index cbbde75d5..4fa17b1e8 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/data/NetworkServices.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/data/NetworkServices.kt @@ -12,15 +12,12 @@ private const val FILE = "file" interface GithubPageServices { - @GET("{$FILE}") - suspend fun fetchUpdateJSON(@Path(FILE) file: String): UpdateInfo + @GET + suspend fun fetchUpdateJSON(@Url file: String): UpdateInfo } interface RawServices { - @GET - suspend fun fetchCustomUpdate(@Url url: String): UpdateInfo - @GET @Streaming suspend fun fetchFile(@Url url: String): ResponseBody diff --git a/app/src/main/java/com/topjohnwu/magisk/core/repository/NetworkService.kt b/app/src/main/java/com/topjohnwu/magisk/core/repository/NetworkService.kt index 18cb1e7ef..5f243dc00 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/repository/NetworkService.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/repository/NetworkService.kt @@ -40,7 +40,7 @@ class NetworkService( private suspend fun fetchBetaUpdate() = pages.fetchUpdateJSON("beta.json") private suspend fun fetchCanaryUpdate() = pages.fetchUpdateJSON("canary.json") private suspend fun fetchDebugUpdate() = pages.fetchUpdateJSON("debug.json") - private suspend fun fetchCustomUpdate(url: String) = raw.fetchCustomUpdate(url) + private suspend fun fetchCustomUpdate(url: String) = pages.fetchUpdateJSON(url) private inline fun safe(factory: () -> T): T? { return try {