Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisCabo committed Mar 27, 2023
1 parent 45c5cab commit 8f975fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ public ResponseEntity<Resource> downloadImageProfile(@Parameter(description = "i
content = @Content) })
// Register users
@PostMapping("/")
public ResponseEntity<User> register(@RequestBody User user) throws IOException {
public ResponseEntity<User> register(@RequestParam String name, @RequestParam String lastName, @RequestParam String mail, @RequestParam String password, @RequestParam String aboutMe) throws IOException {
User user = new User(name,lastName, mail, password, aboutMe);
ResponseEntity<User> response = userService.register(user);
if (response.getStatusCode() == HttpStatus.CREATED) {
URI location = fromCurrentRequest().path("/{id}").buildAndExpand(user.getId()).toUri();
Expand Down
2 changes: 2 additions & 0 deletions code/backend/src/main/java/app/model/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class User{

@JsonIgnore
private String encodedPassword;


private String name;
private String lastName;

Expand Down

0 comments on commit 8f975fc

Please sign in to comment.