Commit d960c71
committed
Week 2 Lessons 3.2: Get Album by ID
We achieved that using req.params.albumId and storing the value in a variable called albumIdToFind. Then using the .find method on the albumsData to find the album that has the matching id or albumIdToFind and then display that single album.
Tested by sending: localhost:35981/albums to check the new album is added to all albums list.1 parent fdc7b3b commit d960c71
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
0 commit comments