[API/Liburs] Fix Librus API push config endpoint.

This commit is contained in:
Kacper Ziubryniewicz 2020-03-26 20:34:59 +01:00
parent e271048577
commit 114c841f0c

View File

@ -21,6 +21,14 @@ class LibrusApiPushConfig(override val data: DataLibrus,
}
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(
"provider" to "FCM",
"device" to tokenLibrus,