Remove fetchCustomUpdate

This commit is contained in:
vvb2060 2022-01-27 21:50:14 +08:00 committed by John Wu
parent 4772868d6a
commit 6e918ffd68
2 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -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 <T> safe(factory: () -> T): T? {
return try {