Improve format of index
This commit is contained in:
parent
d9cf650019
commit
c2810d4871
1 changed files with 4 additions and 7 deletions
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue