mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-02-07 16:44:37 +01:00
[API/Liburs] Fix Librus API push config endpoint.
This commit is contained in:
parent
e271048577
commit
114c841f0c
@ -21,6 +21,14 @@ class LibrusApiPushConfig(override val data: DataLibrus,
|
|||||||
}
|
}
|
||||||
|
|
||||||
init { data.app.config.sync.tokenLibrus?.also { tokenLibrus ->
|
init { data.app.config.sync.tokenLibrus?.also { tokenLibrus ->
|
||||||
|
if(tokenLibrus.isEmpty()) {
|
||||||
|
data.setSyncNext(ENDPOINT_LIBRUS_API_PUSH_CONFIG, SYNC_ALWAYS)
|
||||||
|
data.app.config.sync.tokenLibrusList =
|
||||||
|
data.app.config.sync.tokenLibrusList + profileId
|
||||||
|
onSuccess(ENDPOINT_LIBRUS_API_PUSH_CONFIG)
|
||||||
|
return@also
|
||||||
|
}
|
||||||
|
|
||||||
apiGet(TAG, "ChangeRegister", payload = JsonObject(
|
apiGet(TAG, "ChangeRegister", payload = JsonObject(
|
||||||
"provider" to "FCM",
|
"provider" to "FCM",
|
||||||
"device" to tokenLibrus,
|
"device" to tokenLibrus,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user