mirror of
https://github.com/grafana/grafana.git
synced 2026-08-18 09:05:04 -05:00
Quick Ugly Fix for Oauth not to make web_hack.go panic (#49653)
This commit is contained in:
@@ -42,8 +42,10 @@ func wrap_handler(h web.Handler) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := getReqCtx(r.Context())
|
||||
res := handle(ctx)
|
||||
if res != nil {
|
||||
res.WriteTo(ctx)
|
||||
}
|
||||
}
|
||||
case handlerCtx:
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
handle(web.FromContext(r.Context()))
|
||||
|
||||
Reference in New Issue
Block a user