diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-07-03 19:40:43 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-07-03 19:40:43 +0300 |
| commit | 57ef0fc54af49052539306c35501a893f24eca18 (patch) | |
| tree | 3e5bb6f4cd2bb0e1f2e21445842297e937ff9fd1 /backend/controllers | |
| parent | docs: add github sponsorship button (diff) | |
| download | lphub-57ef0fc54af49052539306c35501a893f24eca18.tar.gz lphub-57ef0fc54af49052539306c35501a893f24eca18.tar.bz2 lphub-57ef0fc54af49052539306c35501a893f24eca18.zip | |
docs: update swagger
Former-commit-id: d55150a028f67d5dc8668e2b2384d13511339b46
Diffstat (limited to 'backend/controllers')
| -rw-r--r-- | backend/controllers/modController.go | 30 | ||||
| -rw-r--r-- | backend/controllers/recordController.go | 6 |
2 files changed, 18 insertions, 18 deletions
diff --git a/backend/controllers/modController.go b/backend/controllers/modController.go index b26f1ae..f1874f7 100644 --- a/backend/controllers/modController.go +++ b/backend/controllers/modController.go | |||
| @@ -14,11 +14,11 @@ import ( | |||
| 14 | // @Summary Create map summary with specified map id. | 14 | // @Summary 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 |
| @@ -100,11 +100,11 @@ func CreateMapSummary(c *gin.Context) { | |||
| 100 | // @Summary Edit map summary with specified map id. | 100 | // @Summary 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 |
| @@ -183,11 +183,11 @@ func EditMapSummary(c *gin.Context) { | |||
| 183 | // @Summary Delete map summary with specified map id. | 183 | // @Summary 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 |
diff --git a/backend/controllers/recordController.go b/backend/controllers/recordController.go index 183ab27..9cc6da6 100644 --- a/backend/controllers/recordController.go +++ b/backend/controllers/recordController.go | |||
| @@ -27,9 +27,9 @@ import ( | |||
| 27 | // @Produce json | 27 | // @Produce json |
| 28 | // @Param Authorization header string true "JWT Token" | 28 | // @Param Authorization header string true "JWT Token" |
| 29 | // @Param host_demo formData file true "Host Demo" | 29 | // @Param host_demo formData file true "Host Demo" |
| 30 | // @Param partner_demo formData file true "Partner Demo" | 30 | // @Param partner_demo formData file false "Partner Demo" |
| 31 | // @Param is_partner_orange formData boolean true "Is Partner Orange" | 31 | // @Param is_partner_orange formData boolean false "Is Partner Orange" |
| 32 | // @Param partner_id formData string true "Partner ID" | 32 | // @Param partner_id formData string false "Partner ID" |
| 33 | // @Success 200 {object} models.Response | 33 | // @Success 200 {object} models.Response |
| 34 | // @Failure 400 {object} models.Response | 34 | // @Failure 400 {object} models.Response |
| 35 | // @Failure 401 {object} models.Response | 35 | // @Failure 401 {object} models.Response |