MK
Size: a a a
MK
TO
TO
TO
TO
А
resAll
полупустой.then(resAll => {
return Categories.findAll().then(categories => {
categories.forEach(category => {
if (category.parent_id == 0) {
resAll.map['/manual/' + category.link] = ['get'];
resAll.route['/manual/' + category.link] = {
lastmod: currentDate,
changefreq: 'daily',
priority: 0.5,
};
} else {
(async function() {
await Pages.findByCategoryId(category.id)
.then(subcat => {
if (subcat) {
subcat.forEach(row => {
resAll.map[`/manual/${category.child_link}${row.link}`] = ['get'];
resAll.route[`/manual/${category.child_link}${row.link}`] = {
lastmod: currentDate,
changefreq: 'daily',
priority: 0.5,
};
});
}
})
.catch(err => console.log(err));
})();
}
});
return resAll;
});
}).then(
В
А
НВ
В
А
В
А
НВ
В
В
В
А
В
А