adopting agent instructions

for a more consistent coding style
This commit is contained in:
2026-04-12 08:03:59 +02:00
parent 2cac1cc41d
commit 7fadf82c4c
5 changed files with 115 additions and 885 deletions
+22
View File
@@ -1,3 +1,25 @@
move the model in this file to the appropiate package.
register everything via the init function
Take care that no circle references are created during this process.
The last commit contains all changes that had to be done to fulfill the corresponding task for package character.
Make a plan, update and create tests, keep it small and simple
(You may spawn subagents to analyze, plan, implement and check.)
# --------------
`RegisterRoutes` migth be unexported in `routes.go`. The `init()` in `register.go` calls it and also invokes `models.MigrateStructure(db)` for the module's own entities. Handler functions are unexported (lowercase) unless explicitly consumed by another module.
# ------
Update RegisterRoutes to remove RegisterPublicRoutes
func RegisterRoutes(r *gin.RouterGroup) {
group := r.Group("/maintenance")
group.GET("/skills", listSkills) // all authenticated users
protected := group.Group("")
protected.Use(user.RequireMaintainer())
protected.POST("/skills", createSkill) // maintainer + admin only
}
# --------------
I want to remove the string "midgard" as a selection criterium for GameSystem (game_system) from the code.
It would be best if I could have a table for Game Systems and select the right records by this ID.
That means that we can show a list of available games systems in the frontend when we select or edit a char, skill, spell, weapon or other equipment. that must be handled to when exporting and importing data.