feat: improved building

This commit is contained in:
2025-04-17 20:30:21 -04:00
parent 7a799868fb
commit 1c7cf7966f
11 changed files with 121 additions and 83 deletions

View File

@ -2,14 +2,16 @@ package client
import (
"embed"
"io"
"io/fs"
"net/http"
"github.com/spotdemo4/trevstack/server/internal/interceptors"
)
func NewClientHandler(key string, clientFS *embed.FS) http.Handler {
if clientFS == nil {
func NewClientHandler(key string, clientFS embed.FS) http.Handler {
_, err := clientFS.ReadDir(".")
if err == io.EOF {
return http.NotFoundHandler()
}