fix: clear password while get current user
This commit is contained in:
parent
18b218c6c9
commit
8971a924f1
@ -62,6 +62,7 @@ func Login(c *gin.Context) {
|
||||
// if token is empty, return guest user
|
||||
func CurrentUser(c *gin.Context) {
|
||||
user := c.MustGet("user").(*model.User)
|
||||
user.Password = ""
|
||||
common.SuccessResp(c, user)
|
||||
userResp := *user
|
||||
userResp.Password = ""
|
||||
common.SuccessResp(c, userResp)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user