diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-24 12:41:36 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-24 12:41:36 +0300 |
| commit | f04bb43856e72d3c0265bc7e2c38661fac268c7c (patch) | |
| tree | 153d96d63fa211df50cff6136cfe2c6639c3e03f /backend | |
| parent | feat: removing (by flag) records (#56) (diff) | |
| download | lphub-f04bb43856e72d3c0265bc7e2c38661fac268c7c.tar.gz lphub-f04bb43856e72d3c0265bc7e2c38661fac268c7c.tar.bz2 lphub-f04bb43856e72d3c0265bc7e2c38661fac268c7c.zip | |
docs: add delete record, update discussion and main (#56)
Former-commit-id: 8abea862f066e06fc31df3d5ddd921334fe76f5c
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/handlers/discussions.go | 1 | ||||
| -rw-r--r-- | backend/handlers/record.go | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/backend/handlers/discussions.go b/backend/handlers/discussions.go index 605c7c3..6687a53 100644 --- a/backend/handlers/discussions.go +++ b/backend/handlers/discussions.go | |||
| @@ -154,7 +154,6 @@ func FetchMapDiscussion(c *gin.Context) { | |||
| 154 | // @Produce json | 154 | // @Produce json |
| 155 | // @Param Authorization header string true "JWT Token" | 155 | // @Param Authorization header string true "JWT Token" |
| 156 | // @Param mapid path int true "Map ID" | 156 | // @Param mapid path int true "Map ID" |
| 157 | // @Param discussionid path int true "Discussion ID" | ||
| 158 | // @Param request body CreateMapDiscussionRequest true "Body" | 157 | // @Param request body CreateMapDiscussionRequest true "Body" |
| 159 | // @Success 200 {object} models.Response{data=CreateMapDiscussionRequest} | 158 | // @Success 200 {object} models.Response{data=CreateMapDiscussionRequest} |
| 160 | // @Router /maps/{mapid}/discussions [post] | 159 | // @Router /maps/{mapid}/discussions [post] |
diff --git a/backend/handlers/record.go b/backend/handlers/record.go index 70095bf..4b0fafa 100644 --- a/backend/handlers/record.go +++ b/backend/handlers/record.go | |||
| @@ -210,6 +210,16 @@ func CreateRecordWithDemo(c *gin.Context) { | |||
| 210 | }) | 210 | }) |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | // DELETE Record | ||
| 214 | // | ||
| 215 | // @Description Delete record with specified map and record id. | ||
| 216 | // @Tags maps | ||
| 217 | // @Produce json | ||
| 218 | // @Param mapid path int true "Map ID" | ||
| 219 | // @Param recordid path int true "Record ID" | ||
| 220 | // @Param Authorization header string true "JWT Token" | ||
| 221 | // @Success 200 {object} models.Response | ||
| 222 | // @Router /maps/{mapid}/record/{recordid} [delete] | ||
| 213 | func DeleteRecord(c *gin.Context) { | 223 | func DeleteRecord(c *gin.Context) { |
| 214 | mapID, err := strconv.Atoi(c.Param("mapid")) | 224 | mapID, err := strconv.Atoi(c.Param("mapid")) |
| 215 | if err != nil { | 225 | if err != nil { |