refactor accountUpdateSource from Call to coroutine (#4386)
It is the last place where we used a Call 🥳
This commit is contained in:
parent
f8a25f896b
commit
d5a01f671c
2 changed files with 17 additions and 26 deletions
|
|
@ -49,7 +49,6 @@ import com.keylesspalace.tusky.entity.Translation
|
|||
import com.keylesspalace.tusky.entity.TrendingTag
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody
|
||||
import retrofit2.Call
|
||||
import retrofit2.Response
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.DELETE
|
||||
|
|
@ -292,11 +291,11 @@ interface MastodonApi {
|
|||
|
||||
@FormUrlEncoded
|
||||
@PATCH("api/v1/accounts/update_credentials")
|
||||
fun accountUpdateSource(
|
||||
suspend fun accountUpdateSource(
|
||||
@Field("source[privacy]") privacy: String?,
|
||||
@Field("source[sensitive]") sensitive: Boolean?,
|
||||
@Field("source[language]") language: String?
|
||||
): Call<Account>
|
||||
): NetworkResult<Account>
|
||||
|
||||
@Multipart
|
||||
@PATCH("api/v1/accounts/update_credentials")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue