summaryrefslogtreecommitdiffstats
path: root/api/preference.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-01-20 13:36:16 -0600
committerCorey Hulen <corey@hulen.com>2016-01-20 13:36:16 -0600
commitaefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b (patch)
treed87809ff2a306e5428b0ab6973d05509baa21abd /api/preference.go
parent0b1aff3b24b4ac2df8e963c83d6e52b127c603f9 (diff)
downloadchat-aefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b.tar.gz
chat-aefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b.tar.bz2
chat-aefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b.zip
Revert " PLT-7 adding loc for db calls"
Diffstat (limited to 'api/preference.go')
-rw-r--r--api/preference.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/api/preference.go b/api/preference.go
index cb38370f1..f5c96f1dd 100644
--- a/api/preference.go
+++ b/api/preference.go
@@ -21,7 +21,7 @@ func InitPreference(r *mux.Router) {
}
func getAllPreferences(c *Context, w http.ResponseWriter, r *http.Request) {
- if result := <-Srv.Store.Preference().GetAll(c.T, c.Session.UserId); result.Err != nil {
+ if result := <-Srv.Store.Preference().GetAll(c.Session.UserId); result.Err != nil {
c.Err = result.Err
} else {
data := result.Data.(model.Preferences)
@@ -46,7 +46,7 @@ func savePreferences(c *Context, w http.ResponseWriter, r *http.Request) {
}
}
- if result := <-Srv.Store.Preference().Save(c.T, &preferences); result.Err != nil {
+ if result := <-Srv.Store.Preference().Save(&preferences); result.Err != nil {
c.Err = result.Err
return
}
@@ -58,7 +58,7 @@ func getPreferenceCategory(c *Context, w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r)
category := params["category"]
- if result := <-Srv.Store.Preference().GetCategory(c.T, c.Session.UserId, category); result.Err != nil {
+ if result := <-Srv.Store.Preference().GetCategory(c.Session.UserId, category); result.Err != nil {
c.Err = result.Err
} else {
data := result.Data.(model.Preferences)
@@ -72,7 +72,7 @@ func getPreference(c *Context, w http.ResponseWriter, r *http.Request) {
category := params["category"]
name := params["name"]
- if result := <-Srv.Store.Preference().Get(c.T, c.Session.UserId, category, name); result.Err != nil {
+ if result := <-Srv.Store.Preference().Get(c.Session.UserId, category, name); result.Err != nil {
c.Err = result.Err
} else {
data := result.Data.(model.Preference)