chore: consolidate redundant controllers in mail-service, improve backend stability, refine desktop UX, and enhance Vereinsverwaltung functionality
This commit is contained in:
+18
-2
@@ -50,10 +50,26 @@ class NennungRemoteRepository(private val client: HttpClient) {
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun sendeAntwort(email: String, turnierNr: String, vorname: String, nachname: String): Result<Unit> {
|
||||
return try {
|
||||
client.post("$mailServiceUrl/api/mail/send-reply") {
|
||||
parameter("email", email)
|
||||
parameter("turnierNr", turnierNr)
|
||||
parameter("vorname", vorname)
|
||||
parameter("nachname", nachname)
|
||||
}
|
||||
Result.success(Unit)
|
||||
} catch (e: Exception) {
|
||||
Result.failure(e)
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun markiereAlsGelesen(id: String): Result<Unit> {
|
||||
return try {
|
||||
// Endpunkt müsste im Backend noch implementiert werden, falls gewünscht.
|
||||
// Für jetzt simuliert:
|
||||
client.put("$mailServiceUrl/api/mail/nennungen/$id/status") {
|
||||
contentType(ContentType.Application.Json)
|
||||
setBody("GELESEN")
|
||||
}
|
||||
Result.success(Unit)
|
||||
} catch (e: Exception) {
|
||||
Result.failure(e)
|
||||
|
||||
Reference in New Issue
Block a user