Merge pull request 'refacor: New routing' (#63) from 3002833/Backend:main into restfull

Reviewed-on: Maradona/Backend#63
pull/1/head
David Hess 2024-11-08 11:57:28 +01:00
commit a908989c5f
4 changed files with 11 additions and 10 deletions

View File

@ -102,6 +102,7 @@
<destDir>${project.build.directory}/docs</destDir>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -9,21 +9,21 @@ public class Page {
@GetMapping({ "/", "" })
public String home(Model model) {
return "redirect:/projects";
return "pages/core/home";
}
@GetMapping("/impressum")
public String impressum() {
return "core/impressum";
return "pages/core/impressum";
}
@GetMapping("/datenschutz")
public String datenschutz() {
return "core/datenschutz";
return "pages/core/datenschutz";
}
@GetMapping("/notes")
public String notes() {
return "notes/notes";
return "pages/core/notes";
}
}

View File

@ -38,7 +38,7 @@ public class ProjectPage {
public String projects(Model model) {
var projects = projectService.getAllProjects();
model.addAttribute("projects", projects);
return "projects/projects";
return "/pages/projects/overview";
}
/**
@ -50,7 +50,7 @@ public class ProjectPage {
*/
@GetMapping("/create")
public String create(Model model) {
model.addAttribute("project", new Project());
return "projects/projects-create";
model.addAttribute("projects", new Project());
return "/pages/projects/create";
}
}

View File

@ -55,7 +55,7 @@ public class SkillsPage {
public String profile(Model model) {
model.addAttribute("employee", employeeService.getEmployeeById(user).orElse(null));
model.addAttribute("skills", skillService.getUserSkills(user));
return "skills/skills";
return "/pages/skills/overview";
}
/**
@ -71,7 +71,7 @@ public class SkillsPage {
@GetMapping("/create")
public String createSkill(Model model) {
model.addAttribute("secondarySkill", new SecondarySkill());
return "skills/skills-create";
return "/pages/skills/create";
}
/**
@ -96,7 +96,7 @@ public class SkillsPage {
// TODO: Make sure it returns the correct initail data for secondary skills
model.addAttribute("primarySkills", primarySkillService.getAllPrimarySkills());
model.addAttribute("skillProtoype", new SkillPrototype());
return "skills/skills-add";
return "/pages/skills/add";
}
}