Change the UI of damage & fatigue dialogs.
This commit is contained in:
parent
741bb7cf25
commit
894d8db493
15 changed files with 354 additions and 223 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue