Refactor
This commit is contained in:
parent
ddc3c5ba68
commit
174f8022eb
131 changed files with 512 additions and 917 deletions
|
@ -1,5 +1,5 @@
|
|||
import $ from 'cafy';
|
||||
import getParams from '../../../get-params';
|
||||
import define from '../../../define';
|
||||
import perUserReactionsChart from '../../../../../chart/per-user-reactions';
|
||||
import ID, { transform } from '../../../../../misc/cafy-id';
|
||||
|
||||
|
@ -35,11 +35,8 @@ export const meta = {
|
|||
}
|
||||
};
|
||||
|
||||
export default (params: any) => new Promise(async (res, rej) => {
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) return rej(psErr);
|
||||
|
||||
export default define(meta, (ps) => new Promise(async (res, rej) => {
|
||||
const stats = await perUserReactionsChart.getChart(ps.span as any, ps.limit, ps.userId);
|
||||
|
||||
res(stats);
|
||||
});
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue