Fix hebe students fetch

This commit is contained in:
Mikołaj Pich 2023-04-16 21:33:56 +02:00
parent 57660cc7c9
commit e2ddf47f29
3 changed files with 6 additions and 6 deletions

View file

@ -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()
}
}

View file

@ -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",
)

View file

@ -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)
}