Chore: Moves common and response into separate packages (#30298)
* Chore: moves common and response into separate packages * Chore: moves common and response into separate packages * Update pkg/api/utils/common.go Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> * Chore: changes after PR comments * Chore: move wrap to routing package * Chore: move functions in common to response package * Chore: move functions in common to response package * Chore: formats imports Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
co-authored by
Arve Knudsen
parent
a94c256516
commit
3d41267fc4
@@ -6,6 +6,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/grafana/grafana/pkg/api/response"
|
||||
"github.com/grafana/grafana/pkg/api/routing"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
log "github.com/inconshreveable/log15"
|
||||
|
||||
@@ -30,7 +32,7 @@ func logSentryEventScenario(t *testing.T, desc string, event frontendSentryEvent
|
||||
sc := setupScenarioContext(t, "/log")
|
||||
hs := HTTPServer{}
|
||||
|
||||
handler := Wrap(func(w http.ResponseWriter, c *models.ReqContext) Response {
|
||||
handler := routing.Wrap(func(w http.ResponseWriter, c *models.ReqContext) response.Response {
|
||||
sc.context = c
|
||||
return hs.logFrontendMessage(c, event)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user