fix(gallery): config
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user