Began work on hashing api keys
This commit is contained in:
+3
-5
@@ -2,10 +2,10 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/Unknwon/macaron"
|
||||
"github.com/macaron-contrib/binding"
|
||||
"github.com/grafana/grafana/pkg/api/dtos"
|
||||
"github.com/grafana/grafana/pkg/middleware"
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
"github.com/macaron-contrib/binding"
|
||||
)
|
||||
|
||||
// Register adds http routes
|
||||
@@ -61,10 +61,8 @@ func Register(r *macaron.Macaron) {
|
||||
|
||||
// auth api keys
|
||||
r.Group("/auth/keys", func() {
|
||||
r.Combo("/").
|
||||
Get(GetApiKeys).
|
||||
Post(bind(m.AddApiKeyCommand{}), AddApiKey).
|
||||
Put(bind(m.UpdateApiKeyCommand{}), UpdateApiKey)
|
||||
r.Get("/", GetApiKeys)
|
||||
r.Post("/", bind(m.AddApiKeyCommand{}), AddApiKey)
|
||||
r.Delete("/:id", DeleteApiKey)
|
||||
}, reqAccountAdmin)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user