Fix params order
This commit is contained in:
parent
11008b8c73
commit
c26b6cabd3
2 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ class LoginHelper(
|
|||
}
|
||||
}
|
||||
|
||||
fun sendCertificate(certificate: CertificateResponse, url: String = certificate.action, email: String = ""): Single<SendCertificateResponse> {
|
||||
fun sendCertificate(certificate: CertificateResponse, email: String = "", url: String = certificate.action): Single<SendCertificateResponse> {
|
||||
cookies.cookieStore.removeAll()
|
||||
return api.sendCertificate(url + if (email.isNotBlank()) "?rebuild=$email" else "", mapOf(
|
||||
"wa" to certificate.wa,
|
||||
|
|
|
@ -34,7 +34,7 @@ class RegisterRepository(
|
|||
|
||||
fun getStudents(): Single<List<Student>> {
|
||||
return getSymbols().flatMapObservable { Observable.fromIterable(it) }.flatMap { (symbol, certificate) ->
|
||||
loginHelper.sendCertificate(certificate, certificate.action.replace(startSymbol.getNormalizedSymbol(), symbol))
|
||||
loginHelper.sendCertificate(certificate, "", certificate.action.replace(startSymbol.getNormalizedSymbol(), symbol))
|
||||
.onErrorResumeNext { t ->
|
||||
if (t is AccountPermissionException) Single.just(SendCertificateResponse())
|
||||
else Single.error(t)
|
||||
|
|
Loading…
Reference in a new issue