Commit 57dc12ee by Torkel Ödegaard

Merge pull request #1482 from raintank/issue_1481

fixes #1481.  correctly escape api_key.key column name
parents 6263ec1d c9e5da48
...@@ -66,7 +66,7 @@ func UpdateApiKey(cmd *m.UpdateApiKeyCommand) error { ...@@ -66,7 +66,7 @@ func UpdateApiKey(cmd *m.UpdateApiKeyCommand) error {
func GetApiKeyByKey(query *m.GetApiKeyByKeyQuery) error { func GetApiKeyByKey(query *m.GetApiKeyByKeyQuery) error {
var apikey m.ApiKey var apikey m.ApiKey
has, err := x.Where("key=?", query.Key).Get(&apikey) has, err := x.Where("`key`=?", query.Key).Get(&apikey)
if err != nil { if err != nil {
return err return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment