There are two types of fixes. Let's discuss them here as follows:
- Fix—add mapping for card URL: This is an oversight. Without adding the card URL to @GetMapping in MainController, refreshing the page will show an HTTP 404 error page. The following is the commit record:
Figure 13.10: Fix—add mapping for card URL commit
- Fix—unsubscribe from board channel when opening a card: The vue-router will trigger the beforeRouteLeave navigation guard when the URL is switched from the board URL to the card URL. The fix involves simply adding a condition guard to the unsubscribe method. The following is the commit history:
Figure 13.11: Fix—unsubscribe from board channel when opening a card commit