ShortURL: Fix tests and small refactor (#108871)
This commit is contained in:
+3
-4
@@ -176,7 +176,6 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
r.Get("/import/dashboard", reqSignedIn, hs.Index)
|
||||
r.Get("/dashboards/", reqSignedIn, hs.Index)
|
||||
r.Get("/dashboards/*", reqSignedIn, hs.Index)
|
||||
r.Get("/goto/:uid", reqSignedIn, hs.redirectFromShortURL, hs.Index)
|
||||
|
||||
if hs.Cfg.PublicDashboardsEnabled {
|
||||
// list public dashboards
|
||||
@@ -264,6 +263,9 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
providerParam := ac.Parameter(":provider")
|
||||
r.Get("/admin/authentication/:provider", authorize(ac.EvalPermission(ac.ActionSettingsRead, ac.ScopeSettingsOAuth(providerParam))), hs.Index)
|
||||
|
||||
// ShortURL API
|
||||
hs.registerShortURLAPI(r)
|
||||
|
||||
// authed api
|
||||
r.Group("/api", func(apiRoute routing.RouteRegister) {
|
||||
// user (signed in)
|
||||
@@ -549,9 +551,6 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
// Some channels may have info
|
||||
liveRoute.Get("/info/*", routing.Wrap(hs.Live.HandleInfoHTTP))
|
||||
}, requestmeta.SetSLOGroup(requestmeta.SLOGroupNone))
|
||||
|
||||
// short urls
|
||||
apiRoute.Post("/short-urls", routing.Wrap(hs.createShortURL))
|
||||
}, reqSignedIn)
|
||||
|
||||
// admin api
|
||||
|
||||
Reference in New Issue
Block a user