From 57ff19b8ee48a5e9b5748b8d17d6cd4c26bba0a6 Mon Sep 17 00:00:00 2001
From: Bardioc26 <13843924+Bardioc26@users.noreply.github.com>
Date: Fri, 27 Feb 2026 11:59:30 +0100
Subject: [PATCH] Char skill edit not saved (#36)
* Skill edit was not saved
* show warning when skill name is to be edited in char_skills
---
backend/character/handlers.go | 12 ++-
frontend/src/components/CharacterDetails.vue | 8 +-
frontend/src/components/SkillView.vue | 80 ++++++++++++++++++--
frontend/src/locales/de | 3 +-
frontend/src/locales/en | 3 +-
5 files changed, 97 insertions(+), 9 deletions(-)
diff --git a/backend/character/handlers.go b/backend/character/handlers.go
index 549a49f..41a6f67 100644
--- a/backend/character/handlers.go
+++ b/backend/character/handlers.go
@@ -147,7 +147,17 @@ func UpdateCharacter(c *gin.Context) {
return
}
- c.JSON(http.StatusOK, character)
+ // Reload character to get updated data
+ var updatedCharacter models.Char
+ err = updatedCharacter.FirstID(id)
+ if err != nil {
+ respondWithError(c, http.StatusInternalServerError, "Failed to reload character")
+ return
+ }
+
+ // Return as FeChar with categorized skills
+ feChar := ToFeChar(&updatedCharacter)
+ c.JSON(http.StatusOK, feChar)
}
func DeleteCharacter(c *gin.Context) {
id := c.Param("id")
diff --git a/frontend/src/components/CharacterDetails.vue b/frontend/src/components/CharacterDetails.vue
index aabbcbd..419889b 100644
--- a/frontend/src/components/CharacterDetails.vue
+++ b/frontend/src/components/CharacterDetails.vue
@@ -32,7 +32,7 @@
-