fix: correct static file routing for dashboard assets
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

Mapped /css, /js, and /img to their respective subdirectories in ./static to resolve 404 errors.
This commit is contained in:
2026-03-19 11:07:29 -04:00
parent c7c244992a
commit 2245cca67a

View File

@@ -77,9 +77,11 @@ func (s *Server) setupRoutes() {
s.router.Use(middleware.AuthMiddleware(s.database))
// Static files
s.router.Static("/static", "./static")
s.router.StaticFile("/", "./static/index.html")
s.router.StaticFile("/favicon.ico", "./static/favicon.ico")
s.router.Static("/css", "./static/css")
s.router.Static("/js", "./static/js")
s.router.Static("/img", "./static/img")
// WebSocket
s.router.GET("/ws", s.handleWebSocket)