use of softuni.todolist.entity.Todo in project SoftUni by kostovhg.
the class TodoController method details.
@GetMapping("/todo/{id}")
public String details(Model model, @PathVariable Integer id) {
if (!this.todoRepository.exists(id)) {
return "redirect:/";
}
Todo todo = this.todoRepository.findOne(id);
model.addAttribute("todo", todo);
model.addAttribute("view", "todo/details");
return "base-layout";
}
Aggregations