mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-07-30 22:27:39 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 873e8925d4 | |||
| b23916048a | |||
| 47708fc87a | |||
| a85e572732 |
@@ -331,7 +331,10 @@ func (h *Handler) SqlQueryList(sqlquery string, options SqlQueryOptions) HTTPFun
|
||||
w.Header().Set("Content-Range", fmt.Sprintf("items %d-%d/%d", respOffset, respOffset+len(dbobjlist), total))
|
||||
logger.Info("Serving: Records %d of %d", len(dbobjlist), total)
|
||||
|
||||
// Execute BeforeResponse hook
|
||||
// Execute BeforeResponse hook. The transaction has already committed by
|
||||
// this point, so hooks must use the pooled connection rather than the
|
||||
// now-dead tx.
|
||||
hookCtx.Tx = h.db
|
||||
hookCtx.Result = dbobjlist
|
||||
hookCtx.Total = total
|
||||
if err := h.hooks.Execute(BeforeResponse, hookCtx); err != nil {
|
||||
@@ -631,7 +634,10 @@ func (h *Handler) SqlQuery(sqlquery string, options SqlQueryOptions) HTTPFuncTyp
|
||||
return
|
||||
}
|
||||
|
||||
// Execute BeforeResponse hook
|
||||
// Execute BeforeResponse hook. The transaction has already committed by
|
||||
// this point, so hooks must use the pooled connection rather than the
|
||||
// now-dead tx.
|
||||
hookCtx.Tx = h.db
|
||||
hookCtx.Result = dbobj
|
||||
if err := h.hooks.Execute(BeforeResponse, hookCtx); err != nil {
|
||||
logger.Error("BeforeResponse hook failed: %v", err)
|
||||
|
||||
+497
-350
File diff suppressed because it is too large
Load Diff
+499
-454
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user