-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
from controller/shabad.js
resultsInfo.pages.nextPage = `${req.protocol}://${req.get('host')}${req.baseUrl}${
req.path
}?${Object.keys(req.query)
.map(key => `${key}=${encodeURIComponent(req.query[key])}`)
.join('&')}`;
Maybe we can divide this into two different statements (for base path and query keys.
Also, can we use a URL builder instead?
Something like:
const url = require('url');
const myURL = url.format({
protocol: req.protocol,
hostname: req.get('host'),
pathname: '/some/path',
query: {
key: 'value'
}
});
Originally posted by @mandeepryaz in #268 (comment)
Metadata
Metadata
Assignees
Labels
No labels