Fix hebe students fetch
This commit is contained in:
parent
57660cc7c9
commit
e2ddf47f29
3 changed files with 6 additions and 6 deletions
|
@ -96,9 +96,9 @@ class Hebe {
|
|||
)
|
||||
}
|
||||
|
||||
suspend fun getStudents(url: String, symbol: String): List<StudentInfo> {
|
||||
suspend fun getStudents(url: String): List<StudentInfo> {
|
||||
return serviceManager
|
||||
.getRegisterRepository(url, symbol)
|
||||
.getRegisterRepository(url)
|
||||
.getStudentInfo()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ internal class RepositoryManager(
|
|||
)
|
||||
}
|
||||
|
||||
internal fun getRegisterRepository(baseUrl: String, symbol: String): RegisterRepository = getRegisterRepository(
|
||||
internal fun getRegisterRepository(baseUrl: String, symbol: String = ""): RegisterRepository = getRegisterRepository(
|
||||
baseUrl = "${baseUrl.removeSuffix("/")}/$symbol",
|
||||
)
|
||||
|
||||
|
|
|
@ -145,14 +145,14 @@ class Sdk {
|
|||
set(value) {
|
||||
field = value
|
||||
scrapper.classId = value
|
||||
// hebe.classId = value
|
||||
// hebe.classId = value // todo
|
||||
}
|
||||
|
||||
var studentId = 0
|
||||
set(value) {
|
||||
field = value
|
||||
scrapper.studentId = value
|
||||
// hebe.studentId = value
|
||||
// hebe.studentId = value // todo
|
||||
}
|
||||
|
||||
var diaryId = 0
|
||||
|
@ -275,7 +275,7 @@ class Sdk {
|
|||
symbol = symbol,
|
||||
)
|
||||
return hebe
|
||||
.getStudents(registerDevice.restUrl, symbol)
|
||||
.getStudents(registerDevice.restUrl)
|
||||
.mapHebeUser(registerDevice)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue