mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-19 05:16:56 -06:00
[API/Edudziennik] Fix getting attendances.
This commit is contained in:
parent
9ed1be3594
commit
5c4d6ed140
@ -29,7 +29,7 @@ open class EdudziennikWeb(open val data: DataEdudziennik) {
|
|||||||
val url = "https://dziennikel.appspot.com/" + when (endpoint.endsWith('/') || endpoint.contains('?') || endpoint.isEmpty()) {
|
val url = "https://dziennikel.appspot.com/" + when (endpoint.endsWith('/') || endpoint.contains('?') || endpoint.isEmpty()) {
|
||||||
true -> endpoint
|
true -> endpoint
|
||||||
else -> "$endpoint/"
|
else -> "$endpoint/"
|
||||||
} + (semester?.let { "?semester=$it" } ?: "")
|
} + (semester?.let { "?semester=" + if(it == -1) "all" else it } ?: "")
|
||||||
|
|
||||||
d(tag, "Request: Edudziennik/Web - $url")
|
d(tag, "Request: Edudziennik/Web - $url")
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class EdudziennikWebAttendance(override val data: DataEdudziennik,
|
|||||||
}
|
}
|
||||||
|
|
||||||
init { data.profile?.also { profile ->
|
init { data.profile?.also { profile ->
|
||||||
webGet(TAG, data.studentEndpoint + "Presence") { text ->
|
webGet(TAG, data.studentEndpoint + "Presence", semester = -1) { text ->
|
||||||
|
|
||||||
val attendanceTypes = EDUDZIENNIK_ATTENDANCE_TYPES.find(text)?.get(1)?.split(',')?.map {
|
val attendanceTypes = EDUDZIENNIK_ATTENDANCE_TYPES.find(text)?.get(1)?.split(',')?.map {
|
||||||
val type = EDUDZIENNIK_ATTENDANCE_TYPE.find(it.trim())
|
val type = EDUDZIENNIK_ATTENDANCE_TYPE.find(it.trim())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user