Skip to content

Commit

Permalink
fix: do not send access_token
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Jan 31, 2025
1 parent d9f74bd commit b4e69df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func GetUserById(id int, selectAll bool) (*User, error) {
if selectAll {
err = DB.First(&user, "id = ?", id).Error
} else {
err = DB.Omit("password").First(&user, "id = ?", id).Error
err = DB.Omit("password", "access_token").First(&user, "id = ?", id).Error
}
return &user, err
}
Expand Down

0 comments on commit b4e69df

Please sign in to comment.