From 69235d3f3b8495051fa2b4dbad277ea01ed60ac0 Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Thu, 17 Oct 2019 16:49:58 +0800 Subject: [PATCH] go: db: Fix query of ForceRejection --- GoBot/db/vote.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GoBot/db/vote.go b/GoBot/db/vote.go index da3d532..06ffddd 100644 --- a/GoBot/db/vote.go +++ b/GoBot/db/vote.go @@ -104,7 +104,7 @@ func GetVoteType(voteID int) (string, error) { func UpdateVote(voteID int, userID string, voteValue int) error { if voteValue == ForceRejectionVote { //Check if they used it within a month. - rows, err := db.Query("SELECT voteId FROM choices WHERE date >= ? AND value=?", time.Now().AddDate(0, -1, 0)) + rows, err := db.Query("SELECT voteId FROM choices WHERE date >= ? AND value=?", time.Now().AddDate(0, -1, 0), ForceRejectionVote) if err != nil { return err }