chore/sonarqube-fixes #35
@ -329,8 +329,13 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
|
||||
return success
|
||||
}
|
||||
|
||||
suspend fun updateRemote(): Boolean =
|
||||
isNetworkAvailable() && api.update()?.isSuccess == true
|
||||
suspend fun updateRemote(): Boolean {
|
||||
return if (isNetworkAvailable()) {
|
||||
api.update()?.equals("finished") ?: false
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun login(): Boolean {
|
||||
var result = false
|
||||
|
@ -100,7 +100,7 @@ class SelfossApi(private val apiDetailsService: ApiDetailsService) {
|
||||
parameter("password", apiDetailsService.getPassword())
|
||||
}.body()
|
||||
|
||||
suspend fun update(): SelfossModel.SuccessResponse? =
|
||||
suspend fun update(): String? =
|
||||
client.get(url("/update")) {
|
||||
parameter("username", apiDetailsService.getUserName())
|
||||
parameter("password", apiDetailsService.getPassword())
|
||||
|
Loading…
Reference in New Issue
Block a user