Improve format of index

This commit is contained in:
Starbeamrainbowlabs 2019-07-22 12:42:04 +01:00
parent d9cf650019
commit c2810d4871
1 changed files with 4 additions and 7 deletions

View File

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