aboutsummaryrefslogtreecommitdiff
path: root/backend/api/routes.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-24 12:13:15 +0300
committerGitHub <noreply@github.com>2023-09-24 12:13:15 +0300
commit6f28f28ecd899fd7f90df42528ef178a94f6677d (patch)
treefbb00e75a5074e63028d31e1c90475d2d7d2d7cc /backend/api/routes.go
parentfix: delete demo if parsing goes wrong (#90) (diff)
downloadlphub-6f28f28ecd899fd7f90df42528ef178a94f6677d.tar.gz
lphub-6f28f28ecd899fd7f90df42528ef178a94f6677d.tar.bz2
lphub-6f28f28ecd899fd7f90df42528ef178a94f6677d.zip
feat: removing (by flag) records (#56)
Former-commit-id: cc1bed84ee7ff9133192e1278c8315afee73d23a
Diffstat (limited to 'backend/api/routes.go')
-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)