structure appears to work
Some checks failed
CI / Lint (push) Waiting to run
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
continuous-integration/drone Build is failing

This commit is contained in:
2024-09-12 11:59:41 +10:00
parent eb10ca9ca3
commit 18a2b7227e
25 changed files with 841 additions and 125 deletions

View File

@@ -1,12 +1,12 @@
package router
import (
"log/slog"
"net/http"
"vctp/db"
"vctp/dist"
"vctp/server/handler"
"vctp/server/middleware"
"log/slog"
"net/http"
)
func New(logger *slog.Logger, database db.Database) http.Handler {
@@ -19,6 +19,8 @@ func New(logger *slog.Logger, database db.Database) http.Handler {
mux.Handle("/assets/", middleware.CacheMiddleware(http.FileServer(http.FS(dist.AssetsDir))))
mux.HandleFunc("/", h.Home)
mux.HandleFunc("/api/event/vm/create", h.VmCreate)
mux.HandleFunc("/api/event/vm/update", h.VmUpdate)
return middleware.NewLoggingMiddleware(logger, mux)
}