Refactor
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
import Meta from '../../../models/meta';
|
||||
import define from '../define';
|
||||
|
||||
/**
|
||||
* Get the misskey's statistics
|
||||
*/
|
||||
export default () => new Promise(async (res, rej) => {
|
||||
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 : {});
|
||||
});
|
||||
}));
|
||||
|
Reference in New Issue
Block a user