mirror of
https://github.com/bitwarden/android.git
synced 2026-06-09 08:09:16 -05:00
Rename createSend to createTextSend (#647)
This commit is contained in:
committed by
Álison Fernandes
parent
9ba02c67e0
commit
1db2a25f4b
@@ -18,10 +18,10 @@ import retrofit2.http.Path
|
||||
interface SendsApi {
|
||||
|
||||
/**
|
||||
* Create a send.
|
||||
* Create a text send.
|
||||
*/
|
||||
@POST("sends")
|
||||
suspend fun createSend(@Body body: SendJsonRequest): Result<SyncResponseJson.Send>
|
||||
suspend fun createTextSend(@Body body: SendJsonRequest): Result<SyncResponseJson.Send>
|
||||
|
||||
/**
|
||||
* Create a file send.
|
||||
|
||||
@@ -10,9 +10,9 @@ import com.x8bit.bitwarden.data.vault.datasource.network.model.UpdateSendRespons
|
||||
*/
|
||||
interface SendsService {
|
||||
/**
|
||||
* Attempt to create a send.
|
||||
* Attempt to create a text send.
|
||||
*/
|
||||
suspend fun createSend(
|
||||
suspend fun createTextSend(
|
||||
body: SendJsonRequest,
|
||||
): Result<SyncResponseJson.Send>
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ class SendsServiceImpl(
|
||||
private val clock: Clock,
|
||||
private val json: Json,
|
||||
) : SendsService {
|
||||
override suspend fun createSend(body: SendJsonRequest): Result<SyncResponseJson.Send> =
|
||||
sendsApi.createSend(body = body)
|
||||
override suspend fun createTextSend(body: SendJsonRequest): Result<SyncResponseJson.Send> =
|
||||
sendsApi.createTextSend(body = body)
|
||||
|
||||
override suspend fun createFileSend(body: SendJsonRequest): Result<SendFileResponseJson> =
|
||||
sendsApi.createFileSend(body = body)
|
||||
|
||||
@@ -433,7 +433,7 @@ class VaultRepositoryImpl(
|
||||
.flatMap { send ->
|
||||
when (send.type) {
|
||||
SendType.TEXT -> {
|
||||
sendsService.createSend(body = send.toEncryptedNetworkSend())
|
||||
sendsService.createTextSend(body = send.toEncryptedNetworkSend())
|
||||
}
|
||||
|
||||
SendType.FILE -> {
|
||||
|
||||
Reference in New Issue
Block a user