fix: fix Swagger docs by improving comments

This commit is contained in:
xiao-kong-long
2023-12-23 11:57:18 +08:00
parent 9bef9691fb
commit 21f394847e
9 changed files with 611 additions and 549 deletions

View File

@ -39,6 +39,7 @@ const (
// @Title SendVerificationCode
// @Tag Verification API
// @router /send-verification-code [post]
// @Success 200 {object} object.Userinfo The Response object
func (c *ApiController) SendVerificationCode() {
var vform form.VerificationForm
err := c.ParseForm(&vform)
@ -229,6 +230,7 @@ func (c *ApiController) SendVerificationCode() {
// @Title VerifyCaptcha
// @Tag Verification API
// @router /verify-captcha [post]
// @Success 200 {object} object.Userinfo The Response object
func (c *ApiController) VerifyCaptcha() {
var vform form.VerificationForm
err := c.ParseForm(&vform)
@ -271,6 +273,7 @@ func (c *ApiController) VerifyCaptcha() {
// @Tag Account API
// @Title ResetEmailOrPhone
// @router /api/reset-email-or-phone [post]
// @Success 200 {object} object.Userinfo The Response object
func (c *ApiController) ResetEmailOrPhone() {
user, ok := c.RequireSignedInUser()
if !ok {
@ -365,6 +368,7 @@ func (c *ApiController) ResetEmailOrPhone() {
// @Tag Verification API
// @Title VerifyCode
// @router /api/verify-code [post]
// @Success 200 {object} object.Userinfo The Response object
func (c *ApiController) VerifyCode() {
var authForm form.AuthForm
err := json.Unmarshal(c.Ctx.Input.RequestBody, &authForm)