Rename createSend to createTextSend (#647)

This commit is contained in:
David Perez
2024-01-17 15:28:11 -06:00
committed by Álison Fernandes
parent 9ba02c67e0
commit 1db2a25f4b
6 changed files with 13 additions and 13 deletions

View File

@@ -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.

View File

@@ -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>

View File

@@ -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)

View File

@@ -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 -> {