backend: frontend: add file load feature

added a feature to load existing json files and load the containing monsters
This commit is contained in:
Patryk Hegenberg 2023-12-15 15:38:43 +01:00
parent 32a37eea32
commit 88cfe035e0
3 changed files with 70 additions and 1 deletions

View file

@ -37,6 +37,7 @@ func main() {
routes.HandleFunc("/contact", handlers.ContactHandler(content))
routes.HandleFunc("/monsterTable", handlers.MonsterTableHandler(content, &Monsters))
routes.HandleFunc("/calculate-skills", handlers.SkillCalculationHandler(content))
routes.HandleFunc("/loadFile", handlers.LoadFileHandler(&Monsters))
// Print the message indicating that 'static' has been included.
log.Printf("Eingebunden is %v\n", static)