fix typo (#1004)
* 修改拼写错误 修改拼写错误 exsits -> exists * Update router_login.go
This commit is contained in:
parent
540ef68dc8
commit
90dacd0085
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue