Improve format of index

This commit is contained in:
Starbeamrainbowlabs 2019-07-22 12:42:04 +01:00
parent d9cf650019
commit c2810d4871

View file

@ -41,7 +41,7 @@ class AITrainer {
} }
async train_all() { async train_all() {
let index = {}; let index = [];
for(let gateway of this.repo_gateway.iterate()) { for(let gateway of this.repo_gateway.iterate()) {
let filename = path.join(this.root_dir, "..", this.settings.ai.output_directory, `${gateway.id}`); let filename = path.join(this.root_dir, "..", this.settings.ai.output_directory, `${gateway.id}`);
console.log(filename); console.log(filename);
@ -54,12 +54,9 @@ class AITrainer {
continue; continue;
} }
index[gateway.id] = { index.push({
path: path.relative( id: gateway.id
"./app", });
this.settings.ai.output_directory
)
};
} }
await fs.promises.writeFile( await fs.promises.writeFile(