From 992cfdd3e808a464da973fc308ec296c57e9f939 Mon Sep 17 00:00:00 2001 From: Vaibhav Dixit <4359904+Pannigliaet@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:14:29 +0530 Subject: [PATCH] Fix syntax error in GetBounce method (#2007) --- internal/core/bounces.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/bounces.go b/internal/core/bounces.go index 5103202..ae2b7c4 100644 --- a/internal/core/bounces.go +++ b/internal/core/bounces.go @@ -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,