diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-07-03 23:16:42 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-07-03 23:16:42 +0300 |
| commit | c071eeca829a18941fc29f4e4eb8b8f93a65b5c4 (patch) | |
| tree | 1c68bda13a67ce902e01a89d4b2434e91f457339 /backend/controllers/recordController.go | |
| parent | fix: save uploaded demos as .dem in order for parser to work (#42) (diff) | |
| download | lphub-c071eeca829a18941fc29f4e4eb8b8f93a65b5c4.tar.gz lphub-c071eeca829a18941fc29f4e4eb8b8f93a65b5c4.tar.bz2 lphub-c071eeca829a18941fc29f4e4eb8b8f93a65b5c4.zip | |
docs: refactor docs
Former-commit-id: 3f3833af352d8758ca509a4fe3badedd5250b1ba
Diffstat (limited to 'backend/controllers/recordController.go')
| -rw-r--r-- | backend/controllers/recordController.go | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/backend/controllers/recordController.go b/backend/controllers/recordController.go index 409a2e7..af8eb63 100644 --- a/backend/controllers/recordController.go +++ b/backend/controllers/recordController.go | |||
| @@ -21,20 +21,20 @@ import ( | |||
| 21 | 21 | ||
| 22 | // POST Record | 22 | // POST Record |
| 23 | // | 23 | // |
| 24 | // @Summary Post record with demo of a specific map. | 24 | // @Description Post record with demo of a specific map. |
| 25 | // @Tags maps | 25 | // @Tags maps |
| 26 | // @Accept mpfd | 26 | // @Accept mpfd |
| 27 | // @Produce json | 27 | // @Produce json |
| 28 | // @Param id path int true "Map ID" | 28 | // @Param id path int true "Map ID" |
| 29 | // @Param Authorization header string true "JWT Token" | 29 | // @Param Authorization header string true "JWT Token" |
| 30 | // @Param host_demo formData file true "Host Demo" | 30 | // @Param host_demo formData file true "Host Demo" |
| 31 | // @Param partner_demo formData file false "Partner Demo" | 31 | // @Param partner_demo formData file false "Partner Demo" |
| 32 | // @Param is_partner_orange formData boolean false "Is Partner Orange" | 32 | // @Param is_partner_orange formData boolean false "Is Partner Orange" |
| 33 | // @Param partner_id formData string false "Partner ID" | 33 | // @Param partner_id formData string false "Partner ID" |
| 34 | // @Success 200 {object} models.Response | 34 | // @Success 200 {object} models.Response |
| 35 | // @Failure 400 {object} models.Response | 35 | // @Failure 400 {object} models.Response |
| 36 | // @Failure 401 {object} models.Response | 36 | // @Failure 401 {object} models.Response |
| 37 | // @Router /maps/{id}/record [post] | 37 | // @Router /maps/{id}/record [post] |
| 38 | func CreateRecordWithDemo(c *gin.Context) { | 38 | func CreateRecordWithDemo(c *gin.Context) { |
| 39 | mapId := c.Param("id") | 39 | mapId := c.Param("id") |
| 40 | // Check if user exists | 40 | // Check if user exists |
| @@ -189,14 +189,14 @@ func CreateRecordWithDemo(c *gin.Context) { | |||
| 189 | 189 | ||
| 190 | // GET Demo | 190 | // GET Demo |
| 191 | // | 191 | // |
| 192 | // @Summary Get demo with specified demo uuid. | 192 | // @Description Get demo with specified demo uuid. |
| 193 | // @Tags demo | 193 | // @Tags demo |
| 194 | // @Accept json | 194 | // @Accept json |
| 195 | // @Produce octet-stream | 195 | // @Produce octet-stream |
| 196 | // @Param uuid query int true "Demo UUID" | 196 | // @Param uuid query string true "Demo UUID" |
| 197 | // @Success 200 {file} binary "Demo File" | 197 | // @Success 200 {file} binary "Demo File" |
| 198 | // @Failure 400 {object} models.Response | 198 | // @Failure 400 {object} models.Response |
| 199 | // @Router /demos [get] | 199 | // @Router /demos [get] |
| 200 | func DownloadDemoWithID(c *gin.Context) { | 200 | func DownloadDemoWithID(c *gin.Context) { |
| 201 | uuid := c.Query("uuid") | 201 | uuid := c.Query("uuid") |
| 202 | var locationID string | 202 | var locationID string |