Change the UI of damage & fatigue dialogs.

This commit is contained in:
Thomas Andres Gomez 2025-06-15 14:51:40 +02:00
parent 741bb7cf25
commit 894d8db493
15 changed files with 354 additions and 223 deletions

View file

@ -18,6 +18,10 @@ fun Engine.putCharacterDamage(): suspend RoutingContext.() -> Unit {
name = "damage",
code = APIResponse.ErrorCode.Damage,
)
val armor: Int = call.queryParameters.param(
name = "armor",
code = APIResponse.ErrorCode.Armor,
)
// fetch the character sheet
val characterSheet = characterService.character(characterSheetId)
?: error("CharacterSheet with id:$characterSheetId not found.")
@ -36,6 +40,7 @@ fun Engine.putCharacterDamage(): suspend RoutingContext.() -> Unit {
characterSheetId = characterSheetId,
oldValue = characterSheet.damage,
damage = damage,
armor = armor,
)
)
} catch (exception: Exception) {