Skip to content
Snippets Groups Projects

Draft: Towns

Closed Rhys Nute requested to merge towns into main
Files
3
@@ -38,7 +38,7 @@ public class organisationControllers {
@GetMapping("/towns")
public ModelAndView getTownsPage() {
ModelAndView modelAndView = new ModelAndView("WorkWith/towns.html");
ModelAndView modelAndView = new ModelAndView("towns");
List<addAddTowns> Towns = addAddTownsRepository.getAllAddTowns();
modelAndView.addObject("towns", Towns);
return modelAndView;
@@ -46,7 +46,7 @@ public class organisationControllers {
@Autowired
private addAddTownsRepository addAddTownsRepository;
@PostMapping("/townssub")
@PostMapping("/towns-data")
public ModelAndView townsSent(@Valid @ModelAttribute("towns-data") addAddTowns towns, BindingResult bindingResult, Model model) {
List<addAddTowns> addtowns = addAddTownsRepository.getAllAddTowns();
Loading