Skip to content

Commit

Permalink
Downloads changes to reflect upstream db changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGoring committed Mar 24, 2023
1 parent a3a5da8 commit 0d47690
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions v2.0/helpers/download/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@ function downloadbyid (req, res, next) {
} else {
returner = {
// To avoid deep copy we need to pass the variable through:
'site': JSON.parse(JSON.stringify(x.data.data.dataset))['site']
'site': JSON.parse(JSON.stringify(x.data.data))['site']
};

// delete returner.site.dataset;
//returner['site']['collectionunit']['dataset'] = x.data.data.site.dataset;
returner['site']['collectionunit']['dataset'] = x.data.data.site.dataset;
returner['site']['collectionunit']['chronologies'] = x.data.chronologies;
var defaultchron = getdefault(returner['site']['collectionunit']['chronologies'])
returner['site']['collectionunit']['defaultchronology'] = defaultchron
console.log(returner.site.collectionunit)
returner['site']['collectionunit']['dataset']['samples'] = x.data.data.samples
}
return returner;
Expand Down

0 comments on commit 0d47690

Please sign in to comment.