Skip to content

Commit 9b963d0

Browse files
committed
updated redirect
1 parent 5c0a6a9 commit 9b963d0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Created by Chris Bay
1515
*/
1616
@Controller
17-
@RequestMapping("events/")
17+
@RequestMapping("events")
1818
public class EventController {
1919

2020
private static List<String> events = new ArrayList<>();
@@ -33,7 +33,7 @@ public String displayCreateEventForm() {
3333
@PostMapping("create")
3434
public String createEvent(@RequestParam String eventName) {
3535
events.add(eventName);
36-
return "redirect:";
36+
return "redirect:/events";
3737
}
3838

3939
}

src/main/resources/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>Coding Events</h1>
1010

1111
<nav>
1212
<ul>
13-
<li><a href="events/">All Events</a></li>
13+
<li><a href="/events">All Events</a></li>
1414
</ul>
1515
</nav>
1616

0 commit comments

Comments
 (0)