From 079f047540504c987c7f97fc46e296ea1fc9aa78 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 22 Oct 2015 18:06:22 -0700 Subject: Fixing code review issues --- api/context.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'api/context.go') diff --git a/api/context.go b/api/context.go index 28d6951da..9be3e85cc 100644 --- a/api/context.go +++ b/api/context.go @@ -101,7 +101,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { // Attempt to parse the token from the cookie if len(token) == 0 { - tokens := GetMultiSessionCookie(r) + tokens := GetMultiSessionCookieTokens(r) if len(tokens) > 0 { // If there is only 1 token in the cookie then just use it like normal if len(tokens) == 1 { @@ -527,7 +527,7 @@ func GetSession(token string) *model.Session { return session } -func GetMultiSessionCookie(r *http.Request) []string { +func GetMultiSessionCookieTokens(r *http.Request) []string { if multiCookie, err := r.Cookie(model.SESSION_COOKIE_TOKEN); err == nil { multiToken := multiCookie.Value @@ -540,7 +540,7 @@ func GetMultiSessionCookie(r *http.Request) []string { } func FindMultiSessionForTeamId(r *http.Request, teamId string) (int64, *model.Session) { - for index, token := range GetMultiSessionCookie(r) { + for index, token := range GetMultiSessionCookieTokens(r) { s := GetSession(token) if s != nil && !s.IsExpired() && s.TeamId == teamId { return int64(index), s -- cgit v1.2.3-1-g7c22