@samitouri / QOSami-HFS / commits / df3f2f12

fix: admin/logs: shouldn't show an error when log files are missing

Massimo Melina committed Apr 21, 2025 at 12:35 UTC df3f2f12822ad59b18bb7f4fa286a7d011f8ec4f
1 file changed +1 -1
src/api.log.ts
+1 -1
@@ -13,7 +13,7 @@ import { disconnectionsLog } from './connections'
13
14 export default {
15 async get_log_info() {
16 - const current = Object.fromEntries(await Promise.all(loggers.map(async x => [x.name, await stat(x.path).then(s => s.size)])))
16 + const current = Object.fromEntries(await Promise.all(loggers.map(async x => [x.name, await stat(x.path).then(s => s.size, () => 0)])))
17 return { current, rotated: await getRotatedFiles() }
18 },
19