Skip to content

Commit

Permalink
fix: critical bug fixed
Browse files Browse the repository at this point in the history
Co-authored-by: xz <[email protected]>
  • Loading branch information
songquanpeng and ixuzhen committed Nov 23, 2022
1 parent 53ccb42 commit 5c8f6cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions controller/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ func GitHubBind(c *gin.Context) {
})
return
}
id := c.GetInt("id")
user.Id = id
session := sessions.Default(c)
id := session.Get("id")
// id := c.GetInt("id") // critical bug!
user.Id = id.(int)
user.FillUserById()
user.GitHubId = githubUser.Login
err = user.Update(false)
Expand Down

0 comments on commit 5c8f6cb

Please sign in to comment.