diff options
Diffstat (limited to 'src/server/api/endpoints/stats.ts')
| -rw-r--r-- | src/server/api/endpoints/stats.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts index 74ab6ba945..fc195da22d 100644 --- a/src/server/api/endpoints/stats.ts +++ b/src/server/api/endpoints/stats.ts @@ -3,8 +3,8 @@ import Meta from '../../../models/meta'; /** * Get the misskey's statistics */ -module.exports = () => new Promise(async (res, rej) => { +export default () => new Promise(async (res, rej) => { const meta = await Meta.findOne(); - res(meta.stats); + res(meta ? meta.stats : {}); }); |