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

Fix views for deployment #72

Merged
merged 2 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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";
}
}