aboutsummaryrefslogtreecommitdiffstats
path: root/web/frontend.go
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-13 18:43:03 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-13 18:43:03 -0800
commit21b4eec6c1e096573bcd5f2079bc21e23a960621 (patch)
tree58c8fe2e86aef9859debd05344084e9060dc38c9 /web/frontend.go
parent01d4bbe4b2842cb8c2e4319b6cf03d3050f38d06 (diff)
downloadneko-21b4eec6c1e096573bcd5f2079bc21e23a960621.tar.gz
neko-21b4eec6c1e096573bcd5f2079bc21e23a960621.tar.bz2
neko-21b4eec6c1e096573bcd5f2079bc21e23a960621.zip
refactor(backend): improve testability and add tests (NK-6q9nyg)
Diffstat (limited to 'web/frontend.go')
-rw-r--r--web/frontend.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/frontend.go b/web/frontend.go
index c3ee038..c9f2f09 100644
--- a/web/frontend.go
+++ b/web/frontend.go
@@ -4,14 +4,14 @@ import (
"net/http"
"path/filepath"
"strings"
-
- rice "github.com/GeertJohan/go.rice"
)
func ServeFrontend(w http.ResponseWriter, r *http.Request) {
- // The box is at "web", so we look for "../frontend/dist" relative to it
- // rice will find this box by the string literal
- box := rice.MustFindBox("../frontend/dist")
+ if frontendBox == nil {
+ http.Error(w, "frontend not found", http.StatusNotFound)
+ return
+ }
+ box := frontendBox
// Get the file path from the URL
path := r.URL.Path