Skip to content

Commit

Permalink
Merge pull request #47 from Abirdcfly/main
Browse files Browse the repository at this point in the history
fix some minor issues
  • Loading branch information
bjwswang authored Apr 27, 2023
2 parents a55f4e2 + 6904fe2 commit dafed09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/models/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var _ pg.QueryHook = (*Block)(nil)
func (*Block) BeforeQuery(ctx context.Context, event *pg.QueryEvent) (context.Context, error) {
query, err := event.FormattedQuery()
if err != nil {
return ctx, nil
return ctx, err
}
klog.V(5).Infof("[format query] %s\n", string(query))
return ctx, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/models/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var _ pg.QueryHook = (*Transaction)(nil)
func (*Transaction) BeforeQuery(ctx context.Context, event *pg.QueryEvent) (context.Context, error) {
query, err := event.FormattedQuery()
if err != nil {
return ctx, nil
return ctx, err
}
klog.V(5).Infof("[format query] %s\n", string(query))
return ctx, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/viewer/viewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (h *handler) CountTransactionsCreatedByOrg(ctx *fiber.Ctx) error {
ctx.Status(http.StatusInternalServerError)
if pg.ErrNoRows == err {
ctx.Status(http.StatusNotFound)
msg = fmt.Sprintf("no transactions found")
msg = "no transactions found"
}
return ctx.JSON(map[string]string{"msg": msg})
}
Expand Down

0 comments on commit dafed09

Please sign in to comment.