rename Context to ReqContext

This commit is contained in:
Dan Cech
2018-03-07 11:54:50 -05:00
parent 338655dd37
commit c0ecdee375
63 changed files with 241 additions and 241 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ import (
m "github.com/grafana/grafana/pkg/models"
)
func GetApiKeys(c *m.Context) Response {
func GetApiKeys(c *m.ReqContext) Response {
query := m.GetApiKeysQuery{OrgId: c.OrgId}
if err := bus.Dispatch(&query); err != nil {
@@ -26,7 +26,7 @@ func GetApiKeys(c *m.Context) Response {
return Json(200, result)
}
func DeleteApiKey(c *m.Context) Response {
func DeleteApiKey(c *m.ReqContext) Response {
id := c.ParamsInt64(":id")
cmd := &m.DeleteApiKeyCommand{Id: id, OrgId: c.OrgId}
@@ -39,7 +39,7 @@ func DeleteApiKey(c *m.Context) Response {
return ApiSuccess("API key deleted")
}
func AddApiKey(c *m.Context, cmd m.AddApiKeyCommand) Response {
func AddApiKey(c *m.ReqContext, cmd m.AddApiKeyCommand) Response {
if !cmd.Role.IsValid() {
return ApiError(400, "Invalid role specified", nil)
}