monkeeShark/src/server/api/endpoints/stats.ts
2018-11-02 13:47:44 +09:00

19 lines
340 B
TypeScript

import Meta from '../../../models/meta';
import define from '../define';
export const meta = {
requireCredential: false,
desc: {
'en-US': 'Get the instance\'s statistics'
},
params: {
}
};
export default define(meta, () => new Promise(async (res, rej) => {
const meta = await Meta.findOne();
res(meta ? meta.stats : {});
}));