aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--backend/controllers/modController.go30
-rw-r--r--backend/controllers/recordController.go6
-rw-r--r--docs/docs.go15
-rw-r--r--docs/swagger.json9
-rw-r--r--docs/swagger.yaml3
5 files changed, 26 insertions, 37 deletions
diff --git a/backend/controllers/modController.go b/backend/controllers/modController.go
index b26f1ae..f1874f7 100644
--- a/backend/controllers/modController.go
+++ b/backend/controllers/modController.go
@@ -14,11 +14,11 @@ import (
14// @Summary Create map summary with specified map id. 14// @Summary Create map summary with specified map id.
15// @Tags maps 15// @Tags maps
16// @Produce json 16// @Produce json
17// @Param Authorization header string true "JWT Token" 17// @Param Authorization header string true "JWT Token"
18// @Param id path int true "Map ID" 18// @Param id path int true "Map ID"
19// @Param request body models.CreateMapSummaryRequest true "Body" 19// @Param request body models.CreateMapSummaryRequest true "Body"
20// @Success 200 {object} models.Response{data=models.CreateMapSummaryRequest} 20// @Success 200 {object} models.Response{data=models.CreateMapSummaryRequest}
21// @Failure 400 {object} models.Response 21// @Failure 400 {object} models.Response
22// @Router /maps/{id}/summary [post] 22// @Router /maps/{id}/summary [post]
23func CreateMapSummary(c *gin.Context) { 23func CreateMapSummary(c *gin.Context) {
24 // Check if user exists 24 // Check if user exists
@@ -100,11 +100,11 @@ func CreateMapSummary(c *gin.Context) {
100// @Summary Edit map summary with specified map id. 100// @Summary Edit map summary with specified map id.
101// @Tags maps 101// @Tags maps
102// @Produce json 102// @Produce json
103// @Param Authorization header string true "JWT Token" 103// @Param Authorization header string true "JWT Token"
104// @Param id path int true "Map ID" 104// @Param id path int true "Map ID"
105// @Param request body models.EditMapSummaryRequest true "Body" 105// @Param request body models.EditMapSummaryRequest true "Body"
106// @Success 200 {object} models.Response{data=models.EditMapSummaryRequest} 106// @Success 200 {object} models.Response{data=models.EditMapSummaryRequest}
107// @Failure 400 {object} models.Response 107// @Failure 400 {object} models.Response
108// @Router /maps/{id}/summary [put] 108// @Router /maps/{id}/summary [put]
109func EditMapSummary(c *gin.Context) { 109func EditMapSummary(c *gin.Context) {
110 // Check if user exists 110 // Check if user exists
@@ -183,11 +183,11 @@ func EditMapSummary(c *gin.Context) {
183// @Summary Delete map summary with specified map id. 183// @Summary Delete map summary with specified map id.
184// @Tags maps 184// @Tags maps
185// @Produce json 185// @Produce json
186// @Param Authorization header string true "JWT Token" 186// @Param Authorization header string true "JWT Token"
187// @Param id path int true "Map ID" 187// @Param id path int true "Map ID"
188// @Param request body models.DeleteMapSummaryRequest true "Body" 188// @Param request body models.DeleteMapSummaryRequest true "Body"
189// @Success 200 {object} models.Response{data=models.DeleteMapSummaryRequest} 189// @Success 200 {object} models.Response{data=models.DeleteMapSummaryRequest}
190// @Failure 400 {object} models.Response 190// @Failure 400 {object} models.Response
191// @Router /maps/{id}/summary [delete] 191// @Router /maps/{id}/summary [delete]
192func DeleteMapSummary(c *gin.Context) { 192func DeleteMapSummary(c *gin.Context) {
193 // Check if user exists 193 // Check if user exists
diff --git a/backend/controllers/recordController.go b/backend/controllers/recordController.go
index 183ab27..9cc6da6 100644
--- a/backend/controllers/recordController.go
+++ b/backend/controllers/recordController.go
@@ -27,9 +27,9 @@ import (
27// @Produce json 27// @Produce json
28// @Param Authorization header string true "JWT Token" 28// @Param Authorization header string true "JWT Token"
29// @Param host_demo formData file true "Host Demo" 29// @Param host_demo formData file true "Host Demo"
30// @Param partner_demo formData file true "Partner Demo" 30// @Param partner_demo formData file false "Partner Demo"
31// @Param is_partner_orange formData boolean true "Is Partner Orange" 31// @Param is_partner_orange formData boolean false "Is Partner Orange"
32// @Param partner_id formData string true "Partner ID" 32// @Param partner_id formData string false "Partner ID"
33// @Success 200 {object} models.Response 33// @Success 200 {object} models.Response
34// @Failure 400 {object} models.Response 34// @Failure 400 {object} models.Response
35// @Failure 401 {object} models.Response 35// @Failure 401 {object} models.Response
diff --git a/docs/docs.go b/docs/docs.go
index 9368c2c..41acab3 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -1,5 +1,5 @@
1// Code generated by swaggo/swag. DO NOT EDIT. 1// Package docs GENERATED BY SWAG; DO NOT EDIT
2 2// This file was generated by swaggo/swag
3package docs 3package docs
4 4
5import "github.com/swaggo/swag" 5import "github.com/swaggo/swag"
@@ -355,22 +355,19 @@ const docTemplate = `{
355 "type": "file", 355 "type": "file",
356 "description": "Partner Demo", 356 "description": "Partner Demo",
357 "name": "partner_demo", 357 "name": "partner_demo",
358 "in": "formData", 358 "in": "formData"
359 "required": true
360 }, 359 },
361 { 360 {
362 "type": "boolean", 361 "type": "boolean",
363 "description": "Is Partner Orange", 362 "description": "Is Partner Orange",
364 "name": "is_partner_orange", 363 "name": "is_partner_orange",
365 "in": "formData", 364 "in": "formData"
366 "required": true
367 }, 365 },
368 { 366 {
369 "type": "string", 367 "type": "string",
370 "description": "Partner ID", 368 "description": "Partner ID",
371 "name": "partner_id", 369 "name": "partner_id",
372 "in": "formData", 370 "in": "formData"
373 "required": true
374 } 371 }
375 ], 372 ],
376 "responses": { 373 "responses": {
@@ -1314,8 +1311,6 @@ var SwaggerInfo = &swag.Spec{
1314 Description: "Backend API endpoints for the Least Portals Database.", 1311 Description: "Backend API endpoints for the Least Portals Database.",
1315 InfoInstanceName: "swagger", 1312 InfoInstanceName: "swagger",
1316 SwaggerTemplate: docTemplate, 1313 SwaggerTemplate: docTemplate,
1317 LeftDelim: "{{",
1318 RightDelim: "}}",
1319} 1314}
1320 1315
1321func init() { 1316func init() {
diff --git a/docs/swagger.json b/docs/swagger.json
index 3acc883..3ec06b6 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -348,22 +348,19 @@
348 "type": "file", 348 "type": "file",
349 "description": "Partner Demo", 349 "description": "Partner Demo",
350 "name": "partner_demo", 350 "name": "partner_demo",
351 "in": "formData", 351 "in": "formData"
352 "required": true
353 }, 352 },
354 { 353 {
355 "type": "boolean", 354 "type": "boolean",
356 "description": "Is Partner Orange", 355 "description": "Is Partner Orange",
357 "name": "is_partner_orange", 356 "name": "is_partner_orange",
358 "in": "formData", 357 "in": "formData"
359 "required": true
360 }, 358 },
361 { 359 {
362 "type": "string", 360 "type": "string",
363 "description": "Partner ID", 361 "description": "Partner ID",
364 "name": "partner_id", 362 "name": "partner_id",
365 "in": "formData", 363 "in": "formData"
366 "required": true
367 } 364 }
368 ], 365 ],
369 "responses": { 366 "responses": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 6d06e22..3fe5d66 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -435,17 +435,14 @@ paths:
435 - description: Partner Demo 435 - description: Partner Demo
436 in: formData 436 in: formData
437 name: partner_demo 437 name: partner_demo
438 required: true
439 type: file 438 type: file
440 - description: Is Partner Orange 439 - description: Is Partner Orange
441 in: formData 440 in: formData
442 name: is_partner_orange 441 name: is_partner_orange
443 required: true
444 type: boolean 442 type: boolean
445 - description: Partner ID 443 - description: Partner ID
446 in: formData 444 in: formData
447 name: partner_id 445 name: partner_id
448 required: true
449 type: string 446 type: string
450 produces: 447 produces:
451 - application/json 448 - application/json