Skip to content

Commit ef06285

Browse files
Maria UsinaMaria Usina
authored andcommitted
debugging
1 parent 5dc097e commit ef06285

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/org/launchcode/codingevents/controllers/EventController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public String displayCreateEventForm(Model model) {
5656
// return "redirect:/events";
5757
// }
5858

59-
//Model binding. It creats an object newEvent for us
59+
//Model binding. It creats an object newEvent from Model Event
6060
@PostMapping("create")
6161
public String processCreateEventForm(@ModelAttribute Event newEvent) {
6262
EventData.add(newEvent);
@@ -81,6 +81,7 @@ public String processDeleteEventsForm(@RequestParam(required = false) int[] even
8181
return "redirect:/events";
8282
}
8383

84+
//creating a new class based on Id
8485
@GetMapping("edit/{eventId}")
8586
public String displayEditForm(Model model, @PathVariable int eventId){
8687
Event eventToEdit = EventData.getById(eventId);

src/main/resources/templates/events/edit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>Create Event</h1>
1010
<form method="post" th:action="@{/events/edit}">
1111
<div class="form-group">
1212
<label>Name
13-
<input type="text" name="name" class="form-control" th:value="${event.name}>
13+
<input type="text" name="name" class="form-control" th:value="${event.name}">
1414
</label>
1515
</div>
1616

0 commit comments

Comments
 (0)