diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-22 23:58:26 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-22 23:58:26 +0300 |
| commit | 9cd44de9be62e1291f84763bc029f995301e1e03 (patch) | |
| tree | 5b4b8bc6d7a89173373fbb32c5a8c5013f8c9d82 /backend/handlers/record.go | |
| parent | feat: map search (#78) (diff) | |
| download | lphub-9cd44de9be62e1291f84763bc029f995301e1e03.tar.gz lphub-9cd44de9be62e1291f84763bc029f995301e1e03.tar.bz2 lphub-9cd44de9be62e1291f84763bc029f995301e1e03.zip | |
feat: discussions (#59)
Former-commit-id: ac6ac59367650b6a37650f5aec0587c6ce4d3dd1
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") |