tAdd missing parameter to the Rank() method - scoreboard - Interactive scoreboard for CTF-like games
(HTM) git clone git://git.z3bra.org/scoreboard.git
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 9bb93f39ff3606bde881bbdee57b5fb355613aa2
(DIR) parent 999af0860e61802b8d01a8087ad0f52aba0384ac
(HTM) Author: Willy Goiffon <contact@z3bra.org>
Date: Wed, 2 Oct 2024 23:51:51 +0200
Add missing parameter to the Rank() method
Diffstat:
M db.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/db.go b/db.go
t@@ -131,7 +131,7 @@ func db_get_user_rank(db *sql.DB, name string) (int, error) {
) WHERE score > ? OR (score == ? AND ts < (SELECT ts FROM user WHERE name = ?))
;`
- row := db.QueryRow(query, name, score, score)
+ row := db.QueryRow(query, name, score, score, name)
row.Scan(&rank)
return rank, err