Add characterSheet deletion feature

This commit is contained in:
Thomas Andres Gomez 2025-03-21 09:41:53 +01:00
parent 67e154ed4a
commit ecb0a6705f
14 changed files with 257 additions and 52 deletions

View file

@ -9,7 +9,11 @@ import io.ktor.server.response.respondText
fun Engine.deleteCharacter(): suspend io.ktor.server.routing.RoutingContext.() -> Unit {
return {
val characterSheetId = call.parameters.characterSheetId
val deleted = characterService.deleteCharacterSheet(characterId = characterSheetId)
val deleted = characterService.deleteCharacterSheet(
characterId = characterSheetId
)
// TODO campaign & alteration cleanup.
if (deleted) {
call.respondText(