diff options
Diffstat (limited to 'backend/controllers/userController.go')
| -rw-r--r-- | backend/controllers/userController.go | 15 |
1 files changed, 9 insertions, 6 deletions
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] |
| 23 | func Profile(c *gin.Context) { | 24 | func 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] |
| 209 | func UpdateUser(c *gin.Context) { | 211 | func 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 |