Navigation Menu

Skip to content

Commit

Permalink
Fixing typo in URL thanks to Stéphane in the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jan 22, 2018
1 parent fc6e2d4 commit 0dc2231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion knpu/ep1-stellar/javascript-api.md
Expand Up @@ -6,7 +6,7 @@ That API endpoint also needs to return the new number of hearts to show on the p
ya know... in case 10 other people liked it since we opened the page.

In `ArticleController`, make a new `public function toggleArticleHeart()`. Then
add the route above: `@Route("/new/{slug}")` - to match the show URL - then `/heart`.
add the route above: `@Route("/news/{slug}")` - to match the show URL - then `/heart`.
Give it a name immediately: `article_toggle_heart`. I included the `{slug}` wildcard
in the route so that we know *which* article is being liked. We could also use an
`{id}` wildcard once we have a database.
Expand Down

0 comments on commit 0dc2231

Please sign in to comment.