This commit is contained in:
suyl
2021-04-27 09:29:08 +08:00
parent 4095161df5
commit e5d02223b7

View File

@@ -308,6 +308,22 @@ func (c *Auth2Controller) AddAuthBind() {
}) })
} }
// @Title 绑定认证方式
// @Description 绑定认证方式
// @Param token header string true "认证token"
// @Param authToken formData string true "之前通过login得到的新认证TOKEN"
// @Param mobile formData string true "之前通过getuserbyminiinfo得到的"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /AddAuthBindWithMobile [post]
func (c *Auth2Controller) AddAuthBindWithMobile() {
c.callAddAuthBindWithMobile(func(params *tAuth2AddAuthBindWithMobileParams) (retVal interface{}, errCode string, err error) {
newAuthInfo, err := auth2.GetTokenInfo(params.AuthToken)
err = auth2.AddAuthBindWithMobile(newAuthInfo, params.Mobile)
return retVal, "", err
})
}
// @Title 删除认证方式 // @Title 删除认证方式
// @Description 删除认证方式 // @Description 删除认证方式
// @Param token header string true "认证token" // @Param token header string true "认证token"