aboutsummaryrefslogtreecommitdiff
path: root/backend/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'backend/controllers')
-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()))