forked from DebaucheryLibrarian/traxxx
Added tag filter to releases query, enabled on homepage.
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
const { fetchNetworks, fetchNetworksFromReleases } = require('../networks');
|
||||
|
||||
async function fetchNetworksApi(req, res) {
|
||||
const networkId = typeof req.params.networkId === 'number' ? req.params.networkId : null;
|
||||
const networkSlug = typeof req.params.networkId === 'string' ? req.params.networkId : null;
|
||||
const networkId = typeof req.params.networkId === 'number' ? req.params.networkId : undefined; // null will literally include NULL results
|
||||
const networkSlug = typeof req.params.networkId === 'string' ? req.params.networkId : undefined;
|
||||
|
||||
const networks = await fetchNetworks(networkId, networkSlug);
|
||||
const networks = await fetchNetworks({
|
||||
id: networkId,
|
||||
slug: networkSlug,
|
||||
});
|
||||
|
||||
res.send(networks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user