Refactor stats
This commit is contained in:
rodič
9482a420e1
revize
a8df397899
|
@ -101,11 +101,9 @@ export class UTXOEngine {
|
||||||
const index = JSON.parse(JSON.stringify(entry.index))
|
const index = JSON.parse(JSON.stringify(entry.index))
|
||||||
delete index.specDef
|
delete index.specDef
|
||||||
index.spec = specEndpoints
|
index.spec = specEndpoints
|
||||||
index.stats = {
|
index.stats = { counts: {} }
|
||||||
tracks: entry.specs.tracks.length,
|
for (const sc of Object.keys(entry.specs)) {
|
||||||
speakers: entry.specs.speakers.length,
|
index.stats.counts[sc] = entry.specs[sc].length
|
||||||
events: entry.specs.events.length,
|
|
||||||
faqs: entry.specs.faqs.length
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await this._jsonWrite([entryDir, 'index.json'], index)
|
await this._jsonWrite([entryDir, 'index.json'], index)
|
||||||
|
|
Načítá se…
Odkázat v novém úkolu