Added network to profile context when site is available.

This commit is contained in:
2020-05-18 03:34:41 +02:00
parent 885aa4f627
commit 003e07491d
3 changed files with 14 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ const argv = require('./argv');
const knex = require('./knex');
const whereOr = require('./utils/where-or');
async function curateSite(site, includeParameters = false, includeTags = true) {
function curateSite(site, includeParameters = false) {
const curatedSite = {
id: site.id,
name: site.name,
@@ -26,12 +26,14 @@ async function curateSite(site, includeParameters = false, includeTags = true) {
},
};
/*
if (includeTags) {
curatedSite.tags = await knex('sites_tags')
.select('tags.*', 'sites_tags.inherit')
.where('site_id', site.id)
.join('tags', 'tags.id', 'sites_tags.tag_id');
}
*/
return curatedSite;
}