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))
|
||||
delete index.specDef
|
||||
index.spec = specEndpoints
|
||||
index.stats = {
|
||||
tracks: entry.specs.tracks.length,
|
||||
speakers: entry.specs.speakers.length,
|
||||
events: entry.specs.events.length,
|
||||
faqs: entry.specs.faqs.length
|
||||
index.stats = { counts: {} }
|
||||
for (const sc of Object.keys(entry.specs)) {
|
||||
index.stats.counts[sc] = entry.specs[sc].length
|
||||
}
|
||||
|
||||
await this._jsonWrite([entryDir, 'index.json'], index)
|
||||
|
|
Načítá se…
Odkázat v novém úkolu