Working on improving the create device page

This commit is contained in:
2025-03-24 07:00:07 +01:00
parent 5232e47b1d
commit 6405e7d692
6 changed files with 78 additions and 54 deletions

View File

@@ -35,7 +35,8 @@ func main() {
templates, err := template.New("undefined.gohtml").
Funcs(template.FuncMap{
"statusText": http.StatusText,
"statusText": http.StatusText,
"createDeviceLink": createDeviceLink,
}).
ParseFS(templateFS, "templates/*.gohtml")
@@ -52,7 +53,7 @@ func main() {
r.GET("/", app.getIndex)
r.GET("/device", app.getDevice)
r.GET("/create", app.getCreateDevice)
r.POST("/create", app.postCreateDevice)
//r.POST("/create", app.postCreateDevice)
err = r.Run()
if err != nil {
log.Fatalf("error serving website: %v", err)