summaryrefslogtreecommitdiffstats
path: root/api/context.go
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 /api/context.go
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 'api/context.go')
-rw-r--r--api/context.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/context.go b/api/context.go
index b6ffb1a29..fdca52085 100644
--- a/api/context.go
+++ b/api/context.go
@@ -233,7 +233,7 @@ func GetProtocol(r *http.Request) string {
func (c *Context) LogAudit(extraInfo string) {
audit := &model.Audit{UserId: c.Session.UserId, IpAddress: c.IpAddress, Action: c.Path, ExtraInfo: extraInfo, SessionId: c.Session.Id}
- if r := <-Srv.Store.Audit().Save(audit); r.Err != nil {
+ if r := <-Srv.Store.Audit().Save(c.T, audit); r.Err != nil {
c.LogError(r.Err)
}
}
@@ -245,7 +245,7 @@ func (c *Context) LogAuditWithUserId(userId, extraInfo string) {
}
audit := &model.Audit{UserId: userId, IpAddress: c.IpAddress, Action: c.Path, ExtraInfo: extraInfo, SessionId: c.Session.Id}
- if r := <-Srv.Store.Audit().Save(audit); r.Err != nil {
+ if r := <-Srv.Store.Audit().Save(c.T, audit); r.Err != nil {
c.LogError(r.Err)
}
}