This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package de.tsschulz.tt_tagebuch.shared.api
|
||||
|
||||
import de.tsschulz.tt_tagebuch.shared.api.http.AuthedHttpClient
|
||||
import io.ktor.client.request.post
|
||||
import io.ktor.client.request.setBody
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class MobileFeedbackBody(
|
||||
val message: String,
|
||||
val screen: String,
|
||||
val clubId: Int? = null,
|
||||
val appVersion: String = "",
|
||||
val platform: String = "Android",
|
||||
val backendBaseUrl: String = "",
|
||||
)
|
||||
|
||||
class FeedbackApi(
|
||||
private val client: AuthedHttpClient,
|
||||
) {
|
||||
suspend fun send(body: MobileFeedbackBody) {
|
||||
client.http.post("/api/mobile-feedback") {
|
||||
setBody(body)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user