From f5eb3c1bcb0c7e367f64bd8e5a0d2d5418f8e2ef Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 20 Jan 2016 07:59:56 -0600 Subject: PLT-7 adding loc for db calls audits and prefs --- web/web.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'web') diff --git a/web/web.go b/web/web.go index 016e0c147..ee75a92e6 100644 --- a/web/web.go +++ b/web/web.go @@ -5,6 +5,12 @@ package web import ( "fmt" + "html/template" + "net/http" + "net/url" + "strconv" + "strings" + l4g "github.com/alecthomas/log4go" "github.com/gorilla/mux" "github.com/mattermost/platform/api" @@ -13,11 +19,6 @@ import ( "github.com/mattermost/platform/utils" "github.com/mssola/user_agent" "gopkg.in/fsnotify.v1" - "html/template" - "net/http" - "net/url" - "strconv" - "strings" ) var Templates *template.Template @@ -241,7 +242,7 @@ func login(c *api.Context, w http.ResponseWriter, r *http.Request) { if session != nil { w.Header().Set(model.HEADER_TOKEN, session.Token) lastViewChannelName := "town-square" - if lastViewResult := <-api.Srv.Store.Preference().Get(session.UserId, model.PREFERENCE_CATEGORY_LAST, model.PREFERENCE_NAME_LAST_CHANNEL); lastViewResult.Err == nil { + if lastViewResult := <-api.Srv.Store.Preference().Get(c.T, session.UserId, model.PREFERENCE_CATEGORY_LAST, model.PREFERENCE_NAME_LAST_CHANNEL); lastViewResult.Err == nil { if lastViewChannelResult := <-api.Srv.Store.Channel().Get(lastViewResult.Data.(model.Preference).Value); lastViewChannelResult.Err == nil { lastViewChannelName = lastViewChannelResult.Data.(*model.Channel).Name } -- cgit v1.2.3-1-g7c22