Initial create device page

This commit is contained in:
2025-03-24 06:41:51 +01:00
parent 0c81f56f3b
commit 6a834330c1
5 changed files with 68 additions and 7 deletions

View File

@@ -2,11 +2,12 @@ package main
import (
"embed"
"gitea.seeseepuff.be/seeseemelk/mysqlite"
"github.com/gin-gonic/gin"
"html/template"
"log"
"net/http"
"gitea.seeseepuff.be/seeseemelk/mysqlite"
"github.com/gin-gonic/gin"
)
//go:embed migrations/*.sql
@@ -50,6 +51,8 @@ func main() {
r.Use(errorHandler)
r.GET("/", app.getIndex)
r.GET("/device", app.getDevice)
r.GET("/create", app.getCreateDevice)
r.POST("/create", app.postCreateDevice)
err = r.Run()
if err != nil {
log.Fatalf("error serving website: %v", err)