mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-11-25 22:01:17 +00:00
Fix recommendations
This commit is contained in:
parent
5973f70ba1
commit
0003856e20
1 changed files with 2 additions and 1 deletions
|
@ -13,7 +13,8 @@ fs.mkdirSync(outDir, { recursive: true });
|
||||||
// Write the stats file
|
// Write the stats file
|
||||||
try {
|
try {
|
||||||
const stats = JSON.parse(fs.readFileSync(statsFile, "utf8"));
|
const stats = JSON.parse(fs.readFileSync(statsFile, "utf8"));
|
||||||
const recommended_domains = fs.readFileSync(recommendationsFile, "utf8").split(',');
|
const recommended_domains = fs.readFileSync(recommendationsFile, "utf8").trim().split(',');
|
||||||
|
console.log(recommended_domains);
|
||||||
const recommended = stats.instance_details.filter(i =>
|
const recommended = stats.instance_details.filter(i =>
|
||||||
recommended_domains.includes(i.domain)
|
recommended_domains.includes(i.domain)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue