feat: include app version in sidebar footer
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m0s

This commit is contained in:
juancwu 2026-02-09 21:51:16 +00:00
commit b47e48b882
7 changed files with 46 additions and 7 deletions

View file

@ -0,0 +1,16 @@
package middleware
import (
"net/http"
"git.juancwu.dev/juancwu/budgit/internal/ctxkeys"
)
func AppVersion(version string) func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctx := ctxkeys.WithAppVersion(r.Context(), version)
next.ServeHTTP(w, r.WithContext(ctx))
})
}
}