11
This commit is contained in:
commit
0cc4016ada
@ -77,6 +77,7 @@ func NewRouter() *gin.Engine {
|
||||
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
|
||||
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
|
||||
privateGroup.POST("check/register", account.CheckRegister) //校验是否注册
|
||||
privateGroup.GET("get/ip", account.GetIP)
|
||||
acRoute := privateGroup.Group("/user")
|
||||
acRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
{
|
||||
|
||||
@ -577,6 +577,10 @@ func CheckRegister(c *gin.Context) {
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
func GetIP(c *gin.Context) {
|
||||
ip := c.ClientIP()
|
||||
service.Success(c, ip)
|
||||
}
|
||||
func UserLogout(c *gin.Context) {
|
||||
req := account.DecryptJwtRequest{}
|
||||
req.Token = c.GetHeader(e.Authorization)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user