- commit
- d2d691c
- parent
- 2527b65
- author
- Eric Bower
- date
- 2024-02-24 21:45:42 +0000 UTC
fix(router): pass writer to create serve basic
1 files changed,
+2,
-1
1@@ -106,7 +106,8 @@ func findRouteConfig(r *http.Request, routes []Route, subdomainRoutes []Route, c
2 func CreateServe(routes []Route, subdomainRoutes []Route, cfg *ConfigSite, dbpool db.DB, st storage.StorageServe, logger *slog.Logger, cache *cache.Cache) ServeFn {
3 return func(w http.ResponseWriter, r *http.Request) {
4 curRoutes, subdomain := findRouteConfig(r, routes, subdomainRoutes, cfg)
5- CreateServeBasic(curRoutes, subdomain, cfg, dbpool, st, logger, cache)
6+ router := CreateServeBasic(curRoutes, subdomain, cfg, dbpool, st, logger, cache)
7+ router(w, r)
8 }
9 }
10