mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-31 05:48:19 +01:00
[API/Librus] Fix indicating parent account during first login.
This commit is contained in:
parent
7c7dff743b
commit
4480a7e486
@ -54,6 +54,8 @@ class LibrusFirstLogin(val data: DataLibrus, val onSuccess: () -> Unit) {
|
||||
return@portalGet
|
||||
}
|
||||
|
||||
val isParent = account.getString("group") == "parent"
|
||||
|
||||
val id = account.getInt("id") ?: continue
|
||||
val login = account.getString("login") ?: continue
|
||||
val token = account.getString("accessToken") ?: continue
|
||||
@ -69,7 +71,7 @@ class LibrusFirstLogin(val data: DataLibrus, val onSuccess: () -> Unit) {
|
||||
data.portalEmail,
|
||||
studentNameLong,
|
||||
studentNameShort,
|
||||
null
|
||||
if (isParent) studentNameLong else null /* temporarily - there is no parent name provided, only the type */
|
||||
).apply {
|
||||
studentData["accountId"] = id
|
||||
studentData["accountLogin"] = login
|
||||
|
Loading…
x
Reference in New Issue
Block a user