未验证 提交 90dacd00 编写于 作者: H Henry Chia 提交者: GitHub

fix typo (#1004)

* 修改拼写错误

修改拼写错误
exsits -> exists

* Update router_login.go
上级 540ef68d
......@@ -143,8 +143,8 @@ func refreshPost(c *gin.Context) {
func loginRedirect(c *gin.Context) {
redirect := ginx.QueryStr(c, "redirect", "/")
v, exsits := c.Get("userid")
if exsits {
v, exists := c.Get("userid")
if exists {
userid := v.(int64)
user, err := models.UserGetById(userid)
ginx.Dangerous(err)
......@@ -152,7 +152,7 @@ func loginRedirect(c *gin.Context) {
ginx.Bomb(200, "user not found")
}
if user.Username != "" { // alread login
if user.Username != "" { // already login
ginx.NewRender(c).Data(redirect, nil)
return
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册