aboutsummaryrefslogtreecommitdiff
path: root/backend/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'backend/handlers')
-rw-r--r--backend/handlers/map.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/handlers/map.go b/backend/handlers/map.go
index 9b0caef..0a0206e 100644
--- a/backend/handlers/map.go
+++ b/backend/handlers/map.go
@@ -139,12 +139,12 @@ func FetchMapLeaderboards(c *gin.Context) {
139 return 139 return
140 } 140 }
141 response.Map.ID = intID 141 response.Map.ID = intID
142 sql := `SELECT g.name, c.name, m.name, is_disabled, m.image 142 sql := `SELECT g.name, c.name, m.name, is_disabled, m.image, g.is_coop
143 FROM maps m 143 FROM maps m
144 INNER JOIN games g ON m.game_id = g.id 144 INNER JOIN games g ON m.game_id = g.id
145 INNER JOIN chapters c ON m.chapter_id = c.id 145 INNER JOIN chapters c ON m.chapter_id = c.id
146 WHERE m.id = $1` 146 WHERE m.id = $1`
147 err = database.DB.QueryRow(sql, id).Scan(&response.Map.GameName, &response.Map.ChapterName, &response.Map.MapName, &isDisabled, &response.Map.Image) 147 err = database.DB.QueryRow(sql, id).Scan(&response.Map.GameName, &response.Map.ChapterName, &response.Map.MapName, &isDisabled, &response.Map.Image, &response.Map.IsCoop)
148 if err != nil { 148 if err != nil {
149 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) 149 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))
150 return 150 return