this repo has no description

knotserver: use correct context key

Signed-off-by: Seongmin Lee <git@boltless.me>

authored by boltless.me and committed by tangled.org 7dd6bccc 2c7b9392

+3 -2
+3 -2
knotserver/router.go
··· 83 83 84 84 r.Route("/{did}", func(r chi.Router) { 85 85 r.Use(h.resolveDidRedirect) 86 - r.Use(h.resolveRepo) 87 86 r.Route("/{name}", func(r chi.Router) { 87 + r.Use(h.resolveRepo) 88 + 88 89 // routes for git operations 89 90 r.Get("/info/refs", h.InfoRefs) 90 91 r.Post("/git-upload-archive", h.UploadArchive) ··· 176 177 return 177 178 } 178 179 179 - ctx := context.WithValue(r.Context(), "repoPath", repoPath) 180 + ctx := context.WithValue(r.Context(), ctxRepoPathKey{}, repoPath) 180 181 next.ServeHTTP(w, r.WithContext(ctx)) 181 182 }) 182 183 }