summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-20 07:59:56 -0600
committer=Corey Hulen <corey@hulen.com>2016-01-20 07:59:56 -0600
commitf5eb3c1bcb0c7e367f64bd8e5a0d2d5418f8e2ef (patch)
treec40d7064cd2045c36b5c95db8faa9997497e459a /web
parent1acd38b7b19521d06d274c42c00ce7072cd92196 (diff)
downloadchat-f5eb3c1bcb0c7e367f64bd8e5a0d2d5418f8e2ef.tar.gz
chat-f5eb3c1bcb0c7e367f64bd8e5a0d2d5418f8e2ef.tar.bz2
chat-f5eb3c1bcb0c7e367f64bd8e5a0d2d5418f8e2ef.zip
PLT-7 adding loc for db calls audits and prefs
Diffstat (limited to 'web')
-rw-r--r--web/web.go13
1 files changed, 7 insertions, 6 deletions
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
}