From 75a6de9ac25fba229e5daa391222edc495c0ecff Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Wed, 12 Jul 2023 18:29:04 +0300 Subject: fix: sql typo for edit map summary (#48) Former-commit-id: 79b149b959b8cad999269e16834443c7de295079 --- backend/controllers/modController.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/controllers/modController.go') diff --git a/backend/controllers/modController.go b/backend/controllers/modController.go index 72f1a53..07edff5 100644 --- a/backend/controllers/modController.go +++ b/backend/controllers/modController.go @@ -151,7 +151,7 @@ func EditMapSummary(c *gin.Context) { return } sql = `SELECT mh.id FROM map_history mh WHERE mh.score_count = $1 AND mh.category_id = $2 AND mh.map_id = $3` - err = database.DB.QueryRow(sql, mapID, request.RouteID).Scan(&historyID) + err = database.DB.QueryRow(sql, scoreCount, categoryID, mapID).Scan(&historyID) if err != nil { c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) return -- cgit v1.2.3