From 0fad12fea5122c67ab88bdf172423e80c919baa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sun, 19 Jan 2020 21:39:28 +0100 Subject: [PATCH] [Updates] Change update channel to beta. --- .../pl/szczodrzynski/edziennik/data/api/szkolny/SzkolnyApi.kt | 4 ++-- .../main/java/pl/szczodrzynski/edziennik/sync/UpdateWorker.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/szkolny/SzkolnyApi.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/szkolny/SzkolnyApi.kt index 44119134..17affcb5 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/szkolny/SzkolnyApi.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/szkolny/SzkolnyApi.kt @@ -201,7 +201,7 @@ class SzkolnyApi(val app: App) { )).execute().body() } - fun getUpdate(): ApiResponse>? { - return api.updates().execute().body() + fun getUpdate(channel: String): ApiResponse>? { + return api.updates(channel).execute().body() } } diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/sync/UpdateWorker.kt b/app/src/main/java/pl/szczodrzynski/edziennik/sync/UpdateWorker.kt index bad9a7d3..e0b75baa 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/sync/UpdateWorker.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/sync/UpdateWorker.kt @@ -76,7 +76,7 @@ class UpdateWorker(val context: Context, val params: WorkerParameters) : Worker( fun runNow(app: App) { try { val api = SzkolnyApi(app) - val response = api.getUpdate() + val response = api.getUpdate("beta") if (response?.success != true) return val updates = response.data