+stores readable

This commit is contained in:
Linux User 2023-12-26 22:50:38 +00:00
parent c6ff2f1110
commit 2b694290f2
8 changed files with 100 additions and 81 deletions

View file

@ -17,7 +17,7 @@ type Surfer struct {
}
type Heat struct {
Name string `json:"name"`
Round string `json:"round"`
Category string `json:"category"`
Number int `json:"number"`
Timer int `json:"timer"`
@ -26,7 +26,7 @@ type Heat struct {
}
func heatName(heat Heat) string {
str := fmt.Sprintf("%s.%d.%s", heat.Name, heat.Number, heat.Category)
str := fmt.Sprintf("%s.%d.%s", heat.Round, heat.Number, heat.Category)
strings.ReplaceAll(str, " ", "_")
return str
}

View file

@ -58,6 +58,9 @@ func (app *App) RegisterWebRoutes() {
setup := app.Engine.Group("/setup")
setup.Static("/", "./static/setup")
surfers := app.Engine.Group("/surfers")
surfers.Static("/", "./static/surfers")
draws := app.Engine.Group("/draws")
draws.Static("/", "./static/draws")