Update Remanga.kt (#7218)
* Update Remanga.kt Fix crash with 500 on remanga * Remanga 26 version
This commit is contained in:
parent
964ad72e2c
commit
8f8c1ef90e
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Remanga'
|
||||
pkgNameSuffix = 'ru.remanga'
|
||||
extClass = '.Remanga'
|
||||
extVersionCode = 25
|
||||
extVersionCode = 26
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ class Remanga : ConfigurableSource, HttpSource() {
|
|||
jsonObject.put("password", password)
|
||||
val body = jsonObject.toString().toRequestBody(MEDIA_TYPE)
|
||||
val response = chain.proceed(POST("$baseUrl/api/users/login/", headers, body))
|
||||
if (response.code == 400) {
|
||||
if (response.code >= 400) {
|
||||
throw Exception("Failed to login")
|
||||
}
|
||||
val user = gson.fromJson<SeriesWrapperDto<UserDto>>(response.body?.charStream()!!)
|
||||
|
|
Loading…
Reference in New Issue