Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Aug 6, 2024
1 parent 93c6d76 commit 4490258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TokenAuth() func(c *gin.Context) {
if token != nil {
id := c.GetInt("id")
if id == 0 {
c.Set("id", token.Id)
c.Set("id", token.UserId)
}
}
if err != nil {
Expand Down

0 comments on commit 4490258

Please sign in to comment.