mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
More work on backend for user favorites
This commit is contained in:
@@ -16,7 +16,7 @@ type AuthOptions struct {
|
||||
}
|
||||
|
||||
func getRequestUserId(c *Context) int64 {
|
||||
userId := c.Session.Get("userId")
|
||||
userId := c.Session.Get(SESS_KEY_USERID)
|
||||
|
||||
if userId != nil {
|
||||
return userId.(int64)
|
||||
@@ -24,8 +24,8 @@ func getRequestUserId(c *Context) int64 {
|
||||
|
||||
// TODO: figure out a way to secure this
|
||||
if c.Query("render") == "1" {
|
||||
userId := c.QueryInt64("userId")
|
||||
c.Session.Set("userId", userId)
|
||||
userId := c.QueryInt64(SESS_KEY_USERID)
|
||||
c.Session.Set(SESS_KEY_USERID, userId)
|
||||
return userId
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user