mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Fix address null bug.
This commit is contained in:
@ -293,6 +293,7 @@ func (c *ApiController) Login() {
|
|||||||
Type: "normal-user",
|
Type: "normal-user",
|
||||||
DisplayName: userInfo.DisplayName,
|
DisplayName: userInfo.DisplayName,
|
||||||
Avatar: userInfo.AvatarUrl,
|
Avatar: userInfo.AvatarUrl,
|
||||||
|
Address: []string{},
|
||||||
Email: userInfo.Email,
|
Email: userInfo.Email,
|
||||||
Score: score,
|
Score: score,
|
||||||
IsAdmin: false,
|
IsAdmin: false,
|
||||||
|
@ -91,8 +91,8 @@ func TestGetMaskedUsers(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "1",
|
name: "1",
|
||||||
args: args{users: []*User{{Password: "casdoor"},{Password: "casbin"}}},
|
args: args{users: []*User{{Password: "casdoor"}, {Password: "casbin"}}},
|
||||||
want: []*User{{Password: "***"},{Password: "***"}},
|
want: []*User{{Password: "***"}, {Password: "***"}},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
Reference in New Issue
Block a user