diff --git a/controllers/auth.go b/controllers/auth.go index 7c812b62..cbfa19d2 100644 --- a/controllers/auth.go +++ b/controllers/auth.go @@ -293,6 +293,7 @@ func (c *ApiController) Login() { Type: "normal-user", DisplayName: userInfo.DisplayName, Avatar: userInfo.AvatarUrl, + Address: []string{}, Email: userInfo.Email, Score: score, IsAdmin: false, diff --git a/object/user_test.go b/object/user_test.go index 5364d292..9f85d6cb 100644 --- a/object/user_test.go +++ b/object/user_test.go @@ -91,8 +91,8 @@ func TestGetMaskedUsers(t *testing.T) { }{ { name: "1", - args: args{users: []*User{{Password: "casdoor"},{Password: "casbin"}}}, - want: []*User{{Password: "***"},{Password: "***"}}, + args: args{users: []*User{{Password: "casdoor"}, {Password: "casbin"}}}, + want: []*User{{Password: "***"}, {Password: "***"}}, }, } for _, tt := range tests { @@ -102,4 +102,4 @@ func TestGetMaskedUsers(t *testing.T) { } }) } -} \ No newline at end of file +}