mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-24 09:40:28 -06:00
Update stats format
This commit is contained in:
parent
99bb59fa77
commit
d93e43164a
@ -20,13 +20,16 @@ run()
|
||||
async function buildResult (path: string) {
|
||||
const distFiles = await readdir(path)
|
||||
|
||||
const files: { [ name: string ]: number } = {}
|
||||
const files: { name: string, size: number }[] = []
|
||||
|
||||
for (const file of distFiles) {
|
||||
const filePath = join(path, file)
|
||||
|
||||
const statsResult = await stat(filePath)
|
||||
files[file] = statsResult.size
|
||||
files.push({
|
||||
name: file,
|
||||
size: statsResult.size
|
||||
})
|
||||
}
|
||||
|
||||
return files
|
||||
|
Loading…
Reference in New Issue
Block a user