From 6f28f28ecd899fd7f90df42528ef178a94f6677d Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sun, 24 Sep 2023 12:13:15 +0300 Subject: feat: removing (by flag) records (#56) Former-commit-id: cc1bed84ee7ff9133192e1278c8315afee73d23a --- backend/api/routes.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'backend/api') 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 ( mapImagePath string = "/maps/:mapid/image" mapLeaderboardsPath string = "/maps/:mapid/leaderboards" mapRecordPath string = "/maps/:mapid/record" + mapRecordIDPath string = "/maps/:mapid/record/:recordid" mapDiscussionsPath string = "/maps/:mapid/discussions" mapDiscussionIDPath string = "/maps/:mapid/discussions/:discussionid" rankingsPath string = "/rankings" @@ -51,14 +52,18 @@ func InitRoutes(router *gin.Engine) { v1.POST(profilePath, CheckAuth, handlers.UpdateUser) v1.GET(usersPath, CheckAuth, handlers.FetchUser) // Maps + // - Summary v1.GET(mapSummaryPath, handlers.FetchMapSummary) v1.POST(mapSummaryPath, CheckAuth, handlers.CreateMapSummary) v1.PUT(mapSummaryPath, CheckAuth, handlers.EditMapSummary) v1.DELETE(mapSummaryPath, CheckAuth, handlers.DeleteMapSummary) v1.PUT(mapImagePath, CheckAuth, handlers.EditMapImage) + // - Leaderboards v1.GET(mapLeaderboardsPath, handlers.FetchMapLeaderboards) v1.POST(mapRecordPath, CheckAuth, handlers.CreateRecordWithDemo) + v1.DELETE(mapRecordIDPath, CheckAuth, handlers.DeleteRecord) v1.GET(demosPath, handlers.DownloadDemoWithID) + // - Discussions v1.GET(mapDiscussionsPath, handlers.FetchMapDiscussions) v1.GET(mapDiscussionIDPath, handlers.FetchMapDiscussion) v1.POST(mapDiscussionsPath, CheckAuth, handlers.CreateMapDiscussion) -- cgit v1.2.3