Remove Nieprzeczytana and idWiadomoscAdresat from get*Message() endpoint params
This commit is contained in:
parent
5e7fbd2c88
commit
22417c56d9
2 changed files with 6 additions and 18 deletions
|
@ -75,9 +75,9 @@ class MessagesRepository(private val api: MessagesService) {
|
|||
|
||||
suspend fun getMessageDetails(messageId: Int, folderId: Int, read: Boolean, id: Int?): Message {
|
||||
return when (folderId) {
|
||||
1 -> api.getInboxMessage(messageId, read, id).handleErrors().data!!
|
||||
2 -> api.getOutboxMessage(messageId, read, id).handleErrors().data!!
|
||||
3 -> api.getTrashboxMessage(messageId, read, id).handleErrors().data!!
|
||||
1 -> api.getInboxMessage(messageId).handleErrors().data!!
|
||||
2 -> api.getOutboxMessage(messageId).handleErrors().data!!
|
||||
3 -> api.getTrashboxMessage(messageId).handleErrors().data!!
|
||||
else -> throw IllegalArgumentException("Unknown folder id: $folderId")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,27 +48,15 @@ interface MessagesService {
|
|||
|
||||
@POST("Wiadomosc.mvc/GetInboxMessageDetails")
|
||||
@FormUrlEncoded
|
||||
suspend fun getInboxMessage(
|
||||
@Field("messageId") messageId: Int,
|
||||
@Field("Nieprzeczytana") read: Boolean,
|
||||
@Field("idWiadomoscAdresat") id: Int?
|
||||
): ApiResponse<Message>
|
||||
suspend fun getInboxMessage(@Field("messageId") messageId: Int): ApiResponse<Message>
|
||||
|
||||
@POST("Wiadomosc.mvc/GetOutboxMessageDetails")
|
||||
@FormUrlEncoded
|
||||
suspend fun getOutboxMessage(
|
||||
@Field("messageId") messageId: Int,
|
||||
@Field("Nieprzeczytana") read: Boolean,
|
||||
@Field("idWiadomoscAdresat") id: Int?
|
||||
): ApiResponse<Message>
|
||||
suspend fun getOutboxMessage(@Field("messageId") messageId: Int): ApiResponse<Message>
|
||||
|
||||
@POST("Wiadomosc.mvc/GetTrashboxMessageDetails")
|
||||
@FormUrlEncoded
|
||||
suspend fun getTrashboxMessage(
|
||||
@Field("messageId") messageId: Int,
|
||||
@Field("Nieprzeczytana") read: Boolean,
|
||||
@Field("idWiadomoscAdresat") id: Int?
|
||||
): ApiResponse<Message>
|
||||
suspend fun getTrashboxMessage(@Field("messageId") messageId: Int): ApiResponse<Message>
|
||||
|
||||
@POST("NowaWiadomosc.mvc/InsertWiadomosc")
|
||||
suspend fun sendMessage(
|
||||
|
|
Loading…
Reference in a new issue