Skip to content
Snippets Groups Projects
Commit a1bd0569 authored by Rhys Nute's avatar Rhys Nute
Browse files

database

parent bacc9723
No related branches found
No related tags found
1 merge request!16Ready to merge - Database
This commit is part of merge request !16. Comments created here will be created in the context of that merge request.
......@@ -13,8 +13,8 @@ public class DatabaseController {
private UserRepository userRepository;
// @Autowired
// private locationRepository locationRepository;
// @Autowired
// private trailsRepository trailsRepository;
@Autowired
private trailsRepository trailsRepository;
// public DatabaseController() {
//
......@@ -27,13 +27,13 @@ public class DatabaseController {
mav.addObject("users", users);
return mav;
}
// @GetMapping("/trailList")
// public ModelAndView trailList() {
// ModelAndView mav1 = new ModelAndView("towns/trailsData");
// List<trail> trail = trailsRepository.getAllTrails();
// mav1.addObject("trails", trail);
// return mav1;
// }
@GetMapping("/trailList")
public ModelAndView trailList() {
ModelAndView mav1 = new ModelAndView("towns/trailsData");
List<trail> trail = trailsRepository.getAllTrails();
mav1.addObject("trails", trail);
return mav1;
}
// @GetMapping("locationList")
// public ModelAndView locationList(){
// ModelAndView mav2 = new ModelAndView("towns/locationData");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment