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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user