Skip to content

Commit

Permalink
Fix syntax error in GetBounce method (#2007)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pannigliaet authored Aug 27, 2024
1 parent a507e8f commit 992cfdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/core/bounces.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (c *Core) QueryBounces(campID, subID int, source, orderBy, order string, of
// GetBounce retrieves bounce entries based on the given params.
func (c *Core) GetBounce(id int) (models.Bounce, error) {
var out []models.Bounce
stmt := fmt.Sprintf(c.q.QueryBounces, "id", SortAsc)
stmt := strings.ReplaceAll(c.q.QueryBounces, "%order%", "id "+SortAsc)
if err := c.db.Select(&out, stmt, id, 0, 0, "", 0, 1); err != nil {
c.log.Printf("error fetching bounces: %v", err)
return models.Bounce{}, echo.NewHTTPError(http.StatusInternalServerError,
Expand Down

0 comments on commit 992cfdd

Please sign in to comment.