aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/monfront/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/monfront/main.go b/cmd/monfront/main.go
index 68138fc..f8d8ee7 100644
--- a/cmd/monfront/main.go
+++ b/cmd/monfront/main.go
@@ -366,14 +366,14 @@ func checkAction(con *Context) {
}
sql := "update " + setTable + " set " + setClause + " where " + whereColumn + " = any($1::bigint[])"
+ whereVals = append([]any{pq.Array(&checks)}, whereVals...)
if len(whereFields) > 0 {
- whereVals = append([]any{pq.Array(&checks)}, whereVals...)
for i, column := range whereFields {
sql = sql + " and " + column + fmt.Sprintf(" = $%d", i+1)
}
}
- _, err := DB.Exec(sql, whereVals)
+ _, err := DB.Exec(sql, whereVals...)
if err != nil {
con.w.WriteHeader(http.StatusInternalServerError)
fmt.Fprintf(con.w, "could not store changes")