diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-20 08:44:05 -0600 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-20 08:44:05 -0600 |
commit | ef11df753227f3082d5c2226c0e7525e14ed47c7 (patch) | |
tree | 281d2aff44f17084d6133593e7c0bf12dc3615ec /api/channel.go | |
parent | 5b2ec623473abeb44577fbfc9122b792a94a5184 (diff) | |
download | chat-ef11df753227f3082d5c2226c0e7525e14ed47c7.tar.gz chat-ef11df753227f3082d5c2226c0e7525e14ed47c7.tar.bz2 chat-ef11df753227f3082d5c2226c0e7525e14ed47c7.zip |
PLT-7 adding loc db calls for webhooks table
Diffstat (limited to 'api/channel.go')
-rw-r--r-- | api/channel.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/api/channel.go b/api/channel.go index 17a0f2031..f2880da5d 100644 --- a/api/channel.go +++ b/api/channel.go @@ -593,8 +593,8 @@ func deleteChannel(c *Context, w http.ResponseWriter, r *http.Request) { sc := Srv.Store.Channel().Get(id) scm := Srv.Store.Channel().GetMember(id, c.Session.UserId) uc := Srv.Store.User().Get(c.Session.UserId) - ihc := Srv.Store.Webhook().GetIncomingByChannel(id) - ohc := Srv.Store.Webhook().GetOutgoingByChannel(id) + ihc := Srv.Store.Webhook().GetIncomingByChannel(c.T, id) + ohc := Srv.Store.Webhook().GetOutgoingByChannel(c.T, id) if cresult := <-sc; cresult.Err != nil { c.Err = cresult.Err @@ -643,7 +643,7 @@ func deleteChannel(c *Context, w http.ResponseWriter, r *http.Request) { now := model.GetMillis() for _, hook := range incomingHooks { go func() { - if result := <-Srv.Store.Webhook().DeleteIncoming(hook.Id, now); result.Err != nil { + if result := <-Srv.Store.Webhook().DeleteIncoming(c.T, hook.Id, now); result.Err != nil { l4g.Error("Encountered error deleting incoming webhook, id=" + hook.Id) } }() @@ -651,7 +651,7 @@ func deleteChannel(c *Context, w http.ResponseWriter, r *http.Request) { for _, hook := range outgoingHooks { go func() { - if result := <-Srv.Store.Webhook().DeleteOutgoing(hook.Id, now); result.Err != nil { + if result := <-Srv.Store.Webhook().DeleteOutgoing(c.T, hook.Id, now); result.Err != nil { l4g.Error("Encountered error deleting outgoing webhook, id=" + hook.Id) } }() |