From f04bb43856e72d3c0265bc7e2c38661fac268c7c Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sun, 24 Sep 2023 12:41:36 +0300 Subject: docs: add delete record, update discussion and main (#56) Former-commit-id: 8abea862f066e06fc31df3d5ddd921334fe76f5c --- backend/handlers/discussions.go | 1 - backend/handlers/record.go | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'backend/handlers') 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) { // @Produce json // @Param Authorization header string true "JWT Token" // @Param mapid path int true "Map ID" -// @Param discussionid path int true "Discussion ID" // @Param request body CreateMapDiscussionRequest true "Body" // @Success 200 {object} models.Response{data=CreateMapDiscussionRequest} // @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) { }) } +// DELETE Record +// +// @Description Delete record with specified map and record id. +// @Tags maps +// @Produce json +// @Param mapid path int true "Map ID" +// @Param recordid path int true "Record ID" +// @Param Authorization header string true "JWT Token" +// @Success 200 {object} models.Response +// @Router /maps/{mapid}/record/{recordid} [delete] func DeleteRecord(c *gin.Context) { mapID, err := strconv.Atoi(c.Param("mapid")) if err != nil { -- cgit v1.2.3