Char skill edit not saved (#36)

* Skill edit was not saved
* show warning when skill name is to be edited in char_skills
This commit is contained in:
Bardioc26
2026-02-27 11:59:30 +01:00
committed by Frank
parent 261a6294cb
commit 57ff19b8ee
5 changed files with 97 additions and 9 deletions
+11 -1
View File
@@ -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")