diff options
Diffstat (limited to '')
| -rw-r--r-- | backend/controllers/modController.go | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/backend/controllers/modController.go b/backend/controllers/modController.go index f1874f7..d6dc4d4 100644 --- a/backend/controllers/modController.go +++ b/backend/controllers/modController.go | |||
| @@ -11,15 +11,15 @@ import ( | |||
| 11 | 11 | ||
| 12 | // POST Map Summary | 12 | // POST Map Summary |
| 13 | // | 13 | // |
| 14 | // @Summary Create map summary with specified map id. | 14 | // @Description Create map summary with specified map id. |
| 15 | // @Tags maps | 15 | // @Tags maps |
| 16 | // @Produce json | 16 | // @Produce json |
| 17 | // @Param Authorization header string true "JWT Token" | 17 | // @Param Authorization header string true "JWT Token" |
| 18 | // @Param id path int true "Map ID" | 18 | // @Param id path int true "Map ID" |
| 19 | // @Param request body models.CreateMapSummaryRequest true "Body" | 19 | // @Param request body models.CreateMapSummaryRequest true "Body" |
| 20 | // @Success 200 {object} models.Response{data=models.CreateMapSummaryRequest} | 20 | // @Success 200 {object} models.Response{data=models.CreateMapSummaryRequest} |
| 21 | // @Failure 400 {object} models.Response | 21 | // @Failure 400 {object} models.Response |
| 22 | // @Router /maps/{id}/summary [post] | 22 | // @Router /maps/{id}/summary [post] |
| 23 | func CreateMapSummary(c *gin.Context) { | 23 | func CreateMapSummary(c *gin.Context) { |
| 24 | // Check if user exists | 24 | // Check if user exists |
| 25 | user, exists := c.Get("user") | 25 | user, exists := c.Get("user") |
| @@ -97,15 +97,15 @@ func CreateMapSummary(c *gin.Context) { | |||
| 97 | 97 | ||
| 98 | // PUT Map Summary | 98 | // PUT Map Summary |
| 99 | // | 99 | // |
| 100 | // @Summary Edit map summary with specified map id. | 100 | // @Description Edit map summary with specified map id. |
| 101 | // @Tags maps | 101 | // @Tags maps |
| 102 | // @Produce json | 102 | // @Produce json |
| 103 | // @Param Authorization header string true "JWT Token" | 103 | // @Param Authorization header string true "JWT Token" |
| 104 | // @Param id path int true "Map ID" | 104 | // @Param id path int true "Map ID" |
| 105 | // @Param request body models.EditMapSummaryRequest true "Body" | 105 | // @Param request body models.EditMapSummaryRequest true "Body" |
| 106 | // @Success 200 {object} models.Response{data=models.EditMapSummaryRequest} | 106 | // @Success 200 {object} models.Response{data=models.EditMapSummaryRequest} |
| 107 | // @Failure 400 {object} models.Response | 107 | // @Failure 400 {object} models.Response |
| 108 | // @Router /maps/{id}/summary [put] | 108 | // @Router /maps/{id}/summary [put] |
| 109 | func EditMapSummary(c *gin.Context) { | 109 | func EditMapSummary(c *gin.Context) { |
| 110 | // Check if user exists | 110 | // Check if user exists |
| 111 | user, exists := c.Get("user") | 111 | user, exists := c.Get("user") |
| @@ -180,15 +180,15 @@ func EditMapSummary(c *gin.Context) { | |||
| 180 | 180 | ||
| 181 | // DELETE Map Summary | 181 | // DELETE Map Summary |
| 182 | // | 182 | // |
| 183 | // @Summary Delete map summary with specified map id. | 183 | // @Description Delete map summary with specified map id. |
| 184 | // @Tags maps | 184 | // @Tags maps |
| 185 | // @Produce json | 185 | // @Produce json |
| 186 | // @Param Authorization header string true "JWT Token" | 186 | // @Param Authorization header string true "JWT Token" |
| 187 | // @Param id path int true "Map ID" | 187 | // @Param id path int true "Map ID" |
| 188 | // @Param request body models.DeleteMapSummaryRequest true "Body" | 188 | // @Param request body models.DeleteMapSummaryRequest true "Body" |
| 189 | // @Success 200 {object} models.Response{data=models.DeleteMapSummaryRequest} | 189 | // @Success 200 {object} models.Response{data=models.DeleteMapSummaryRequest} |
| 190 | // @Failure 400 {object} models.Response | 190 | // @Failure 400 {object} models.Response |
| 191 | // @Router /maps/{id}/summary [delete] | 191 | // @Router /maps/{id}/summary [delete] |
| 192 | func DeleteMapSummary(c *gin.Context) { | 192 | func DeleteMapSummary(c *gin.Context) { |
| 193 | // Check if user exists | 193 | // Check if user exists |
| 194 | user, exists := c.Get("user") | 194 | user, exists := c.Get("user") |