Open baiyuxiong opened 3 months ago
I have found the reason why. It is due to my implementation of the NewUserService function.
userService in main.go is created by : userService := service.NewUserService()
This NewUserService is wrong:
func NewUserService() *UserService {
return &UserService{}
}
and if * was removed, it will work fine:
func NewUserService() UserService {
return UserService{}
}
Superficially,the error msg "schema: invalid path" has nothing to do NewUserService. It makes me so confused.
Describe the bug Browser shows: schema: invalid path "username"schema: invalid path "username"
To Reproduce Steps to reproduce the behavior: codes as follow:
After click the login button, the page shows : schema: invalid path "username"schema: invalid path "username"
Desktop (please complete the following information):
iris.Version