aboutsummaryrefslogtreecommitdiff
path: root/backend/controllers/modController.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-07-12 18:29:04 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-07-12 18:29:04 +0300
commit75a6de9ac25fba229e5daa391222edc495c0ecff (patch)
tree664cf6f4f9fa2487e023fd4da650b2957dd70a5d /backend/controllers/modController.go
parentfix: logic error on editing map summary (#48) (diff)
downloadlphub-75a6de9ac25fba229e5daa391222edc495c0ecff.tar.gz
lphub-75a6de9ac25fba229e5daa391222edc495c0ecff.tar.bz2
lphub-75a6de9ac25fba229e5daa391222edc495c0ecff.zip
fix: sql typo for edit map summary (#48)
Former-commit-id: 79b149b959b8cad999269e16834443c7de295079
Diffstat (limited to 'backend/controllers/modController.go')
-rw-r--r--backend/controllers/modController.go2
1 files changed, 1 insertions, 1 deletions
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) {
151 return 151 return
152 } 152 }
153 sql = `SELECT mh.id FROM map_history mh WHERE mh.score_count = $1 AND mh.category_id = $2 AND mh.map_id = $3` 153 sql = `SELECT mh.id FROM map_history mh WHERE mh.score_count = $1 AND mh.category_id = $2 AND mh.map_id = $3`
154 err = database.DB.QueryRow(sql, mapID, request.RouteID).Scan(&historyID) 154 err = database.DB.QueryRow(sql, scoreCount, categoryID, mapID).Scan(&historyID)
155 if err != nil { 155 if err != nil {
156 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) 156 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))
157 return 157 return