From 6b0d48423d249b386d2428b46a14dea76bf231e9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 21 Oct 2018 15:08:07 +0900 Subject: Refactor --- src/server/api/endpoints/charts/drive.ts | 4 ++-- src/server/api/endpoints/charts/network.ts | 4 ++-- src/server/api/endpoints/charts/notes.ts | 4 ++-- src/server/api/endpoints/charts/users.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/server/api/endpoints') diff --git a/src/server/api/endpoints/charts/drive.ts b/src/server/api/endpoints/charts/drive.ts index 0572200d6c..f090a7f5f1 100644 --- a/src/server/api/endpoints/charts/drive.ts +++ b/src/server/api/endpoints/charts/drive.ts @@ -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); }); diff --git a/src/server/api/endpoints/charts/network.ts b/src/server/api/endpoints/charts/network.ts index 236674de7c..07ba19d5e0 100644 --- a/src/server/api/endpoints/charts/network.ts +++ b/src/server/api/endpoints/charts/network.ts @@ -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); }); diff --git a/src/server/api/endpoints/charts/notes.ts b/src/server/api/endpoints/charts/notes.ts index 1efd587519..06ed3b7d41 100644 --- a/src/server/api/endpoints/charts/notes.ts +++ b/src/server/api/endpoints/charts/notes.ts @@ -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); }); diff --git a/src/server/api/endpoints/charts/users.ts b/src/server/api/endpoints/charts/users.ts index 21f5e03523..1dea4d5c4d 100644 --- a/src/server/api/endpoints/charts/users.ts +++ b/src/server/api/endpoints/charts/users.ts @@ -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); }); -- cgit v1.2.3-freya