api: Random stuff

pull/1/head
Lunix-420 2024-11-11 16:48:12 +01:00
parent 0f19f75d48
commit 4520f418f7
2 changed files with 6 additions and 2 deletions

View File

@ -52,7 +52,11 @@ public class SkillsPage {
*/ */
@GetMapping({ "/", "" }) @GetMapping({ "/", "" })
public String profile(Model model) { public String profile(Model model) {
model.addAttribute("employee", employeeDetails.getEmployeeByEid(user).orElse(null)); var employee = employeeDetails.getEmployeeByEid(user).orElse(null);
if (employee == null) {
return "/404";
}
model.addAttribute("employee", employee);
model.addAttribute("skills", skillService.getUserSkills(user)); model.addAttribute("skills", skillService.getUserSkills(user));
return "/pages/skills/overview"; return "/pages/skills/overview";
} }

View File

@ -24,7 +24,7 @@ public class Employee {
private String lastName; private String lastName;
@ManyToOne @ManyToOne
@JoinColumn(name = "FID", referencedColumnName = "fid") @JoinColumn(name = "fid")
private FormOfAddress formOfAddress; private FormOfAddress formOfAddress;
private LocalTime dStart; private LocalTime dStart;