Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save new user #114

Open
ricardogusi opened this issue Jul 29, 2021 · 0 comments
Open

Save new user #114

ricardogusi opened this issue Jul 29, 2021 · 0 comments

Comments

@ricardogusi
Copy link

Hi, first of all thank you so much for this application.
Sorry about the "silly" question but how do I register a new user?
I've created this:
@PostMapping("/register")
public ResponseEntity saveUser(@RequestBody User user) {
return ResponseEntity.ok(repository.save(user));

}

and on postaman for example tried this:

{
"username": "ricardo",
"password": "123456",
"firstname": "Ricardo",
"lastname": "Gusi",
"email": "ricardo@email",
"activated" : "1"
}

but I get this:

"message": "Validation failed for classes [org.zerhusen.security.model.User] during persist time for groups [javax.validation.groups.Default, ]\nList of constraint violations:[\n\tConstraintViolationImpl{interpolatedMessage='não pode ser nulo', propertyPath=password, rootBeanClass=class org.zerhusen.security.model.User, messageTemplate='{javax.validation.constraints.NotNull.message}'}\n]",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant