aboutsummaryrefslogtreecommitdiff
path: root/backend/controllers/modController.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-07-12 12:09:39 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-07-12 12:09:39 +0300
commit56ca08d83dce247073ddc90be1f01e8a57ddea5e (patch)
treeff661094d494303c41956cbfb63fb7f1a863461f /backend/controllers/modController.go
parentfeat: delete map summary route (diff)
downloadlphub-56ca08d83dce247073ddc90be1f01e8a57ddea5e.tar.gz
lphub-56ca08d83dce247073ddc90be1f01e8a57ddea5e.tar.bz2
lphub-56ca08d83dce247073ddc90be1f01e8a57ddea5e.zip
fix: sql typo
Former-commit-id: a86ddf35ba75a5940575df760ee705473542fd38
Diffstat (limited to 'backend/controllers/modController.go')
-rw-r--r--backend/controllers/modController.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/backend/controllers/modController.go b/backend/controllers/modController.go
index d6dc4d4..ff79e3e 100644
--- a/backend/controllers/modController.go
+++ b/backend/controllers/modController.go
@@ -144,10 +144,7 @@ func EditMapSummary(c *gin.Context) {
144 defer tx.Rollback() 144 defer tx.Rollback()
145 // Fetch route category and score count 145 // Fetch route category and score count
146 var categoryID, scoreCount int 146 var categoryID, scoreCount int
147 sql := `SELECT mr.category_id, mr.score_count 147 sql := `SELECT mr.category_id, mr.score_count FROM map_routes mr INNER JOIN maps m ON m.id = mr.map_id WHERE m.id = $1 AND mr.id = $2`
148 FROM map_routes mr
149 INNER JOIN maps m
150 WHERE m.id = $1 AND mr.id = $2`
151 err = database.DB.QueryRow(sql, mapID, request.RouteID).Scan(&categoryID, &scoreCount) 148 err = database.DB.QueryRow(sql, mapID, request.RouteID).Scan(&categoryID, &scoreCount)
152 if err != nil { 149 if err != nil {
153 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) 150 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))