fix(gallery): config

This commit is contained in:
2026-06-01 13:23:04 +02:00
parent c55e6bc43f
commit 9ca81d7f13
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ func Default() Cfg {
WebsiteID: "54d8a379-77d5-4c20-b46d-5c9a6c9e39bd",
},
Gallery: &Gallery{
Path: "gallery",
Path: "photos",
},
Cache: &Valkey{
RefreshTime: time.Minute * 10,
+2 -1
View File
@@ -3,6 +3,7 @@ package server
import (
"fmt"
"net/http"
"path"
"time"
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/components/gallery"
@@ -77,7 +78,7 @@ func (s *Server) dynamicRoutes() (h http.Handler, err error) {
func() http.Handler {
mux := http.NewServeMux()
mux.Handle("/gallery", restgallery.New(renderer, gallery.New(fs, s.cfg.Gallery, imageSrv, valkeyClient), s.cfg.Gallery))
mux.Handle(path.Join("/"+s.cfg.Gallery.Path), restgallery.New(renderer, gallery.New(fs, s.cfg.Gallery, imageSrv, valkeyClient), s.cfg.Gallery))
mux.Handle("/", resthome.New(renderer, page.New(fs)))
return mux