aboutsummaryrefslogtreecommitdiff
path: root/backend/handlers/map.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-10-30 12:01:20 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-10-30 12:01:20 +0300
commitec7f00716fac146e4d089a6ab239566c56c8e21f (patch)
tree2f6017b9a6c55efd8a2b763fad8e496bea103d7b /backend/handlers/map.go
parentfrontend: revert map index (diff)
downloadlphub-ec7f00716fac146e4d089a6ab239566c56c8e21f.tar.gz
lphub-ec7f00716fac146e4d089a6ab239566c56c8e21f.tar.bz2
lphub-ec7f00716fac146e4d089a6ab239566c56c8e21f.zip
backend: order map routes
Diffstat (limited to 'backend/handlers/map.go')
-rw-r--r--backend/handlers/map.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/handlers/map.go b/backend/handlers/map.go
index 33910fe..b2a0b91 100644
--- a/backend/handlers/map.go
+++ b/backend/handlers/map.go
@@ -92,7 +92,7 @@ func FetchMapSummary(c *gin.Context) {
92 INNER JOIN categories c ON mh.category_id = c.id 92 INNER JOIN categories c ON mh.category_id = c.id
93 LEFT JOIN map_ratings rt ON mh.map_id = rt.map_id AND mh.category_id = rt.category_id 93 LEFT JOIN map_ratings rt ON mh.map_id = rt.map_id AND mh.category_id = rt.category_id
94 WHERE mh.map_id = $1 AND mh.score_count = mh.score_count GROUP BY mh.id, c.id, mh.user_name, mh.score_count, mh.record_date, mh.description, mh.showcase 94 WHERE mh.map_id = $1 AND mh.score_count = mh.score_count GROUP BY mh.id, c.id, mh.user_name, mh.score_count, mh.record_date, mh.description, mh.showcase
95 ORDER BY mh.record_date ASC;` 95 ORDER BY mh.category_id ASC, mh.score_count ASC;`
96 rows, err := database.DB.Query(sql, id) 96 rows, err := database.DB.Query(sql, id)
97 if err != nil { 97 if err != nil {
98 c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) 98 c.JSON(http.StatusOK, models.ErrorResponse(err.Error()))