go: db: Fix query of ForceRejection

master
Luther Wen Xu 2019-10-17 16:49:58 +07:00
parent ea08cbd36e
commit 69235d3f3b
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 1 additions and 1 deletions

@ -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
}