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