diff options
Diffstat (limited to 'backend/handlers/record.go')
| -rw-r--r-- | backend/handlers/record.go | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/backend/handlers/record.go b/backend/handlers/record.go index 75b5583..70234c3 100644 --- a/backend/handlers/record.go +++ b/backend/handlers/record.go | |||
| @@ -37,18 +37,16 @@ type RecordResponse struct { | |||
| 37 | // @Tags maps | 37 | // @Tags maps |
| 38 | // @Accept mpfd | 38 | // @Accept mpfd |
| 39 | // @Produce json | 39 | // @Produce json |
| 40 | // @Param id path int true "Map ID" | 40 | // @Param mapid path int true "Map ID" |
| 41 | // @Param Authorization header string true "JWT Token" | 41 | // @Param Authorization header string true "JWT Token" |
| 42 | // @Param host_demo formData file true "Host Demo" | 42 | // @Param host_demo formData file true "Host Demo" |
| 43 | // @Param partner_demo formData file false "Partner Demo" | 43 | // @Param partner_demo formData file false "Partner Demo" |
| 44 | // @Param is_partner_orange formData boolean false "Is Partner Orange" | 44 | // @Param is_partner_orange formData boolean false "Is Partner Orange" |
| 45 | // @Param partner_id formData string false "Partner ID" | 45 | // @Param partner_id formData string false "Partner ID" |
| 46 | // @Success 200 {object} models.Response{data=RecordResponse} | 46 | // @Success 200 {object} models.Response{data=RecordResponse} |
| 47 | // @Failure 400 {object} models.Response | 47 | // @Router /maps/{mapid}/record [post] |
| 48 | // @Failure 401 {object} models.Response | ||
| 49 | // @Router /maps/{id}/record [post] | ||
| 50 | func CreateRecordWithDemo(c *gin.Context) { | 48 | func CreateRecordWithDemo(c *gin.Context) { |
| 51 | mapId := c.Param("id") | 49 | mapId := c.Param("mapid") |
| 52 | // Check if user exists | 50 | // Check if user exists |
| 53 | user, exists := c.Get("user") | 51 | user, exists := c.Get("user") |
| 54 | if !exists { | 52 | if !exists { |
| @@ -216,9 +214,8 @@ func CreateRecordWithDemo(c *gin.Context) { | |||
| 216 | // @Tags demo | 214 | // @Tags demo |
| 217 | // @Accept json | 215 | // @Accept json |
| 218 | // @Produce octet-stream | 216 | // @Produce octet-stream |
| 219 | // @Param uuid query string true "Demo UUID" | 217 | // @Param uuid query string true "Demo UUID" |
| 220 | // @Success 200 {file} binary "Demo File" | 218 | // @Success 200 {file} binary "Demo File" |
| 221 | // @Failure 400 {object} models.Response | ||
| 222 | // @Router /demos [get] | 219 | // @Router /demos [get] |
| 223 | func DownloadDemoWithID(c *gin.Context) { | 220 | func DownloadDemoWithID(c *gin.Context) { |
| 224 | uuid := c.Query("uuid") | 221 | uuid := c.Query("uuid") |