forked from DebaucheryLibrarian/traxxx
Modified network releases query to accomodate date sorting. Showing upcoming releases first to last.
This commit is contained in:
@@ -48,7 +48,7 @@ function curateSite(site, network) {
|
||||
return curatedSite;
|
||||
}
|
||||
|
||||
function curateNetwork(network) {
|
||||
function curateNetwork(network, releases) {
|
||||
const curatedNetwork = {
|
||||
id: network.id,
|
||||
name: network.name,
|
||||
@@ -56,13 +56,9 @@ function curateNetwork(network) {
|
||||
url: network.url,
|
||||
};
|
||||
|
||||
if (network.sites) {
|
||||
curatedNetwork.sites = network.sites.map(site => curateSite(site, curatedNetwork));
|
||||
}
|
||||
|
||||
if (network.studios) {
|
||||
curatedNetwork.studios = network.studios;
|
||||
}
|
||||
if (network.sites) curatedNetwork.sites = network.sites.map(site => curateSite(site, curatedNetwork));
|
||||
if (network.studios) curatedNetwork.studios = network.studios;
|
||||
if (releases) curatedNetwork.releases = releases.map(release => curateRelease(release));
|
||||
|
||||
return curatedNetwork;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user