Chore: Move ReqContext to contexthandler service (#62102)

* Chore: Move ReqContext to contexthandler service

* Rename package to contextmodel

* Generate ngalert files

* Remove unused imports
This commit is contained in:
idafurjes
2023-01-27 08:50:36 +01:00
committed by GitHub
parent 8379a29b53
commit 6c5a573772
180 changed files with 1208 additions and 1182 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ import (
"time"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/models"
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/web"
gocache "github.com/patrickmn/go-cache"
@@ -98,7 +98,7 @@ type AvatarCacheServer struct {
var validMD5 = regexp.MustCompile("^[a-fA-F0-9]{32}$")
func (a *AvatarCacheServer) Handler(ctx *models.ReqContext) {
func (a *AvatarCacheServer) Handler(ctx *contextmodel.ReqContext) {
hash := web.Params(ctx.Req)[":hash"]
if len(hash) != 32 || !validMD5.MatchString(hash) {