Refactor
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import $ from 'cafy';
|
||||
import getParams from '../../get-params';
|
||||
import { driveChart } from '../../../../services/stats';
|
||||
import { driveStats } from '../../../../services/stats';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
@ -27,7 +27,7 @@ export default (params: any) => new Promise(async (res, rej) => {
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) throw psErr;
|
||||
|
||||
const stats = await driveChart.getStats(ps.span as any, ps.limit);
|
||||
const stats = await driveStats.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
import $ from 'cafy';
|
||||
import getParams from '../../get-params';
|
||||
import { networkChart } from '../../../../services/stats';
|
||||
import { networkStats } from '../../../../services/stats';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
@ -27,7 +27,7 @@ export default (params: any) => new Promise(async (res, rej) => {
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) throw psErr;
|
||||
|
||||
const stats = await networkChart.getStats(ps.span as any, ps.limit);
|
||||
const stats = await networkStats.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
import $ from 'cafy';
|
||||
import getParams from '../../get-params';
|
||||
import { notesChart } from '../../../../services/stats';
|
||||
import { notesStats } from '../../../../services/stats';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
@ -27,7 +27,7 @@ export default (params: any) => new Promise(async (res, rej) => {
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) throw psErr;
|
||||
|
||||
const stats = await notesChart.getStats(ps.span as any, ps.limit);
|
||||
const stats = await notesStats.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
import $ from 'cafy';
|
||||
import getParams from '../../get-params';
|
||||
import { usersChart } from '../../../../services/stats';
|
||||
import { usersStats } from '../../../../services/stats';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
@ -27,7 +27,7 @@ export default (params: any) => new Promise(async (res, rej) => {
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) throw psErr;
|
||||
|
||||
const stats = await usersChart.getStats(ps.span as any, ps.limit);
|
||||
const stats = await usersStats.getChart(ps.span as any, ps.limit);
|
||||
|
||||
res(stats);
|
||||
});
|
||||
|
Reference in New Issue
Block a user