Skip to content

Commit

Permalink
Merge pull request #72 from Arquisoft/proyectoJava
Browse files Browse the repository at this point in the history
Fix views for deployment
  • Loading branch information
Pelayori authored Feb 25, 2024
2 parents 039c49c + 7c2cdb9 commit 79cb9cf
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ target/
database/hsqldb/build/
database/hsqldb/data/
database/hsqldb/doc/
database/hsqldb/lib/
database/hsqldb/src/
database/hsqldb/testrun/

Expand Down
Binary file added database/hsqldb/lib/hsqldb-osgi-jdk8.jar
Binary file not shown.
Binary file added database/hsqldb/lib/hsqldb.jar
Binary file not shown.
Binary file added database/hsqldb/lib/javax.servlet-api-3.1.0.jar
Binary file not shown.
Binary file added database/hsqldb/lib/sqltool-jdk8.jar
Binary file not shown.
Binary file added database/hsqldb/lib/sqltool.jar
Binary file not shown.
10 changes: 5 additions & 5 deletions src/main/java/com/uniovi/controllers/PlayersController.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public String showRegistrationForm(Model model){

if (model.containsAttribute("user")) {
model.addAttribute("user", model.getAttribute("user"));
return "/player/signup";
return "player/signup";
}

model.addAttribute("user", new PlayerDto());
return "/player/signup";
return "player/signup";
}

@PostMapping("/signup")
Expand All @@ -58,7 +58,7 @@ public String registerUserAccount(@Valid @ModelAttribute("user") PlayerDto user,

if(result.hasErrors()){
model.addAttribute("user", user);
return "/player/signup";
return "player/signup";
}

playerService.addNewPlayer(user);
Expand All @@ -76,11 +76,11 @@ public String showLoginForm(Model model, @RequestParam(value = "error", required
if (SecurityConfig.isAuthenticated())
return "redirect:/home";

return "/player/login";
return "player/login";
}

@GetMapping("/home")
public String home(Model model, Principal principal) {
return "/player/home";
return "player/home";
}
}

0 comments on commit 79cb9cf

Please sign in to comment.