mirror of
https://github.com/dnote/dnote
synced 2026-03-16 23:45:52 +01:00
13 lines
286 B
Go
13 lines
286 B
Go
package routes
|
|
|
|
import (
|
|
"github.com/dnote/dnote/pkg/server/app"
|
|
"net/http"
|
|
)
|
|
|
|
func userMw(inner http.Handler, app *app.App) http.HandlerFunc {
|
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
inner.ServeHTTP(w, r.WithContext(ctx))
|
|
})
|
|
}
|