Compare commits
2 Commits
4b9899c04e
...
269937ff09
Author | SHA1 | Date | |
---|---|---|---|
269937ff09 | |||
a7bc64d61e |
@ -365,12 +365,22 @@ class SelfossApi(
|
|||||||
suspend fun update(): StatusAndData<String> =
|
suspend fun update(): StatusAndData<String> =
|
||||||
bodyOrFailure(
|
bodyOrFailure(
|
||||||
client.tryToGet(url("/update")) {
|
client.tryToGet(url("/update")) {
|
||||||
|
if (!shouldHavePostLogin()) {
|
||||||
|
parameter("username", appSettingsService.getUserName())
|
||||||
|
parameter("password", appSettingsService.getPassword())
|
||||||
|
}
|
||||||
|
if (appSettingsService
|
||||||
|
.getBasicUserName()
|
||||||
|
.isNotEmpty() &&
|
||||||
|
appSettingsService.getBasicPassword().isNotEmpty()
|
||||||
|
) {
|
||||||
headers {
|
headers {
|
||||||
append(
|
append(
|
||||||
HttpHeaders.Accept,
|
HttpHeaders.Accept,
|
||||||
"text/event-stream",
|
"text/event-stream",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user