aboutsummaryrefslogtreecommitdiff
path: root/backend/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'backend/controllers')
-rw-r--r--backend/controllers/recordController.go1
-rw-r--r--backend/controllers/userController.go15
2 files changed, 10 insertions, 6 deletions
diff --git a/backend/controllers/recordController.go b/backend/controllers/recordController.go
index 27f39fc..3e64e14 100644
--- a/backend/controllers/recordController.go
+++ b/backend/controllers/recordController.go
@@ -23,6 +23,7 @@ import (
23// @Summary Post record with demo of a specific map. 23// @Summary Post record with demo of a specific map.
24// @Accept mpfd 24// @Accept mpfd
25// @Produce json 25// @Produce json
26// @Param Authorization header string true "JWT Token"
26// @Param demos formData []file true "Demos" 27// @Param demos formData []file true "Demos"
27// @Param score_count formData int true "Score Count" 28// @Param score_count formData int true "Score Count"
28// @Param score_time formData int true "Score Time" 29// @Param score_time formData int true "Score Time"
diff --git a/backend/controllers/userController.go b/backend/controllers/userController.go
index cb6c15d..51c18d5 100644
--- a/backend/controllers/userController.go
+++ b/backend/controllers/userController.go
@@ -16,9 +16,10 @@ import (
16// @Summary Get profile page of session user. 16// @Summary Get profile page of session user.
17// @Accept json 17// @Accept json
18// @Produce json 18// @Produce json
19// @Success 200 {object} models.Response{data=models.ProfileResponse} 19// @Param Authorization header string true "JWT Token"
20// @Failure 400 {object} models.Response 20// @Success 200 {object} models.Response{data=models.ProfileResponse}
21// @Failure 401 {object} models.Response 21// @Failure 400 {object} models.Response
22// @Failure 401 {object} models.Response
22// @Router /profile [get] 23// @Router /profile [get]
23func Profile(c *gin.Context) { 24func Profile(c *gin.Context) {
24 // Check if user exists 25 // Check if user exists
@@ -202,9 +203,10 @@ func FetchUser(c *gin.Context) {
202// @Summary Update profile page of session user. 203// @Summary Update profile page of session user.
203// @Accept json 204// @Accept json
204// @Produce json 205// @Produce json
205// @Success 200 {object} models.Response{data=models.ProfileResponse} 206// @Param Authorization header string true "JWT Token"
206// @Failure 400 {object} models.Response 207// @Success 200 {object} models.Response{data=models.ProfileResponse}
207// @Failure 401 {object} models.Response 208// @Failure 400 {object} models.Response
209// @Failure 401 {object} models.Response
208// @Router /profile [post] 210// @Router /profile [post]
209func UpdateUser(c *gin.Context) { 211func UpdateUser(c *gin.Context) {
210 // Check if user exists 212 // Check if user exists
@@ -243,6 +245,7 @@ func UpdateUser(c *gin.Context) {
243// @Summary Update country code of session user. 245// @Summary Update country code of session user.
244// @Accept json 246// @Accept json
245// @Produce json 247// @Produce json
248// @Param Authorization header string true "JWT Token"
246// @Param country_code query string true "Country Code [XX]" 249// @Param country_code query string true "Country Code [XX]"
247// @Success 200 {object} models.Response{data=models.ProfileResponse} 250// @Success 200 {object} models.Response{data=models.ProfileResponse}
248// @Failure 400 {object} models.Response 251// @Failure 400 {object} models.Response