aboutsummaryrefslogtreecommitdiff
path: root/backend/api
diff options
context:
space:
mode:
Diffstat (limited to 'backend/api')
-rw-r--r--backend/api/routes.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/api/routes.go b/backend/api/routes.go
index 339dc73..9e703f6 100644
--- a/backend/api/routes.go
+++ b/backend/api/routes.go
@@ -21,6 +21,7 @@ const (
21 mapImagePath string = "/maps/:mapid/image" 21 mapImagePath string = "/maps/:mapid/image"
22 mapLeaderboardsPath string = "/maps/:mapid/leaderboards" 22 mapLeaderboardsPath string = "/maps/:mapid/leaderboards"
23 mapRecordPath string = "/maps/:mapid/record" 23 mapRecordPath string = "/maps/:mapid/record"
24 mapRecordIDPath string = "/maps/:mapid/record/:recordid"
24 mapDiscussionsPath string = "/maps/:mapid/discussions" 25 mapDiscussionsPath string = "/maps/:mapid/discussions"
25 mapDiscussionIDPath string = "/maps/:mapid/discussions/:discussionid" 26 mapDiscussionIDPath string = "/maps/:mapid/discussions/:discussionid"
26 rankingsPath string = "/rankings" 27 rankingsPath string = "/rankings"
@@ -51,14 +52,18 @@ func InitRoutes(router *gin.Engine) {
51 v1.POST(profilePath, CheckAuth, handlers.UpdateUser) 52 v1.POST(profilePath, CheckAuth, handlers.UpdateUser)
52 v1.GET(usersPath, CheckAuth, handlers.FetchUser) 53 v1.GET(usersPath, CheckAuth, handlers.FetchUser)
53 // Maps 54 // Maps
55 // - Summary
54 v1.GET(mapSummaryPath, handlers.FetchMapSummary) 56 v1.GET(mapSummaryPath, handlers.FetchMapSummary)
55 v1.POST(mapSummaryPath, CheckAuth, handlers.CreateMapSummary) 57 v1.POST(mapSummaryPath, CheckAuth, handlers.CreateMapSummary)
56 v1.PUT(mapSummaryPath, CheckAuth, handlers.EditMapSummary) 58 v1.PUT(mapSummaryPath, CheckAuth, handlers.EditMapSummary)
57 v1.DELETE(mapSummaryPath, CheckAuth, handlers.DeleteMapSummary) 59 v1.DELETE(mapSummaryPath, CheckAuth, handlers.DeleteMapSummary)
58 v1.PUT(mapImagePath, CheckAuth, handlers.EditMapImage) 60 v1.PUT(mapImagePath, CheckAuth, handlers.EditMapImage)
61 // - Leaderboards
59 v1.GET(mapLeaderboardsPath, handlers.FetchMapLeaderboards) 62 v1.GET(mapLeaderboardsPath, handlers.FetchMapLeaderboards)
60 v1.POST(mapRecordPath, CheckAuth, handlers.CreateRecordWithDemo) 63 v1.POST(mapRecordPath, CheckAuth, handlers.CreateRecordWithDemo)
64 v1.DELETE(mapRecordIDPath, CheckAuth, handlers.DeleteRecord)
61 v1.GET(demosPath, handlers.DownloadDemoWithID) 65 v1.GET(demosPath, handlers.DownloadDemoWithID)
66 // - Discussions
62 v1.GET(mapDiscussionsPath, handlers.FetchMapDiscussions) 67 v1.GET(mapDiscussionsPath, handlers.FetchMapDiscussions)
63 v1.GET(mapDiscussionIDPath, handlers.FetchMapDiscussion) 68 v1.GET(mapDiscussionIDPath, handlers.FetchMapDiscussion)
64 v1.POST(mapDiscussionsPath, CheckAuth, handlers.CreateMapDiscussion) 69 v1.POST(mapDiscussionsPath, CheckAuth, handlers.CreateMapDiscussion)