Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```js
- const tracks = require('express').Router();
- //...
- // The root router for requests to our tracks path
- track.get('/', function(req, res, next) {
- let albumId = req.params.albumId; // Our problem line
- // retrieve album's track data and render track list page
- });
- // The route for handling a request to a specific track
- track.get('/:trackId', function(req, res, next) {
- let albumId = req.params.albumId; // <-- How do we get this?
- let trackId = req.params.trackId;
- // retrieve individual track data and render on single track page
- });
- //...
- module.exports = tracks;
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement