diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-23 05:36:35 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-23 05:36:35 +0900 |
| commit | 7c7f32d9a6597fdc7bea02da0cfd4a843fd32d22 (patch) | |
| tree | a67396d881993b4240b49f288594b827ef58531c /src/server/api/endpoints/charts | |
| parent | fix(package): update file-type to version 10.1.0 (#2984) (diff) | |
| download | sharkey-7c7f32d9a6597fdc7bea02da0cfd4a843fd32d22.tar.gz sharkey-7c7f32d9a6597fdc7bea02da0cfd4a843fd32d22.tar.bz2 sharkey-7c7f32d9a6597fdc7bea02da0cfd4a843fd32d22.zip | |
Refactoring
Diffstat (limited to 'src/server/api/endpoints/charts')
| -rw-r--r-- | src/server/api/endpoints/charts/drive.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/charts/hashtag.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/charts/network.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/charts/notes.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/charts/user/drive.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/charts/user/following.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/charts/user/notes.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/charts/user/reactions.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/charts/users.ts | 6 |
9 files changed, 27 insertions, 27 deletions
diff --git a/src/server/api/endpoints/charts/drive.ts b/src/server/api/endpoints/charts/drive.ts index c17a9413cd..79a2d59998 100644 --- a/src/server/api/endpoints/charts/drive.ts +++ b/src/server/api/endpoints/charts/drive.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; import getParams from '../../get-params'; -import { driveStats } from '../../../../services/stats'; +import driveChart from '../../../../chart/drive'; export const meta = { desc: { - 'ja-JP': 'ドライブの統計を取得します。' + 'ja-JP': 'ドライブのチャートを取得します。' }, params: { @@ -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 driveStats.getChart(ps.span as any, ps.limit); + const stats = await driveChart.getChart(ps.span as any, ps.limit); res(stats); }); diff --git a/src/server/api/endpoints/charts/hashtag.ts b/src/server/api/endpoints/charts/hashtag.ts index b42bc97eff..c97a8c11dc 100644 --- a/src/server/api/endpoints/charts/hashtag.ts +++ b/src/server/api/endpoints/charts/hashtag.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; import getParams from '../../get-params'; -import { hashtagStats } from '../../../../services/stats'; +import hashtagChart from '../../../../chart/hashtag'; export const meta = { desc: { - 'ja-JP': 'ハッシュタグごとの統計を取得します。' + 'ja-JP': 'ハッシュタグごとのチャートを取得します。' }, params: { @@ -33,7 +33,7 @@ export default (params: any) => new Promise(async (res, rej) => { const [ps, psErr] = getParams(meta, params); if (psErr) throw psErr; - const stats = await hashtagStats.getChart(ps.span as any, ps.limit, ps.tag); + const stats = await hashtagChart.getChart(ps.span as any, ps.limit, ps.tag); res(stats); }); diff --git a/src/server/api/endpoints/charts/network.ts b/src/server/api/endpoints/charts/network.ts index 49d87bfc22..ed3a9c232e 100644 --- a/src/server/api/endpoints/charts/network.ts +++ b/src/server/api/endpoints/charts/network.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; import getParams from '../../get-params'; -import { networkStats } from '../../../../services/stats'; +import networkChart from '../../../../chart/network'; export const meta = { desc: { - 'ja-JP': 'ネットワークの統計を取得します。' + 'ja-JP': 'ネットワークのチャートを取得します。' }, params: { @@ -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 networkStats.getChart(ps.span as any, ps.limit); + const stats = await networkChart.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 a9dc068260..b24bfc638d 100644 --- a/src/server/api/endpoints/charts/notes.ts +++ b/src/server/api/endpoints/charts/notes.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; import getParams from '../../get-params'; -import { notesStats } from '../../../../services/stats'; +import notesChart from '../../../../chart/notes'; export const meta = { desc: { - 'ja-JP': '投稿の統計を取得します。' + 'ja-JP': '投稿のチャートを取得します。' }, params: { @@ -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 notesStats.getChart(ps.span as any, ps.limit); + const stats = await notesChart.getChart(ps.span as any, ps.limit); res(stats); }); diff --git a/src/server/api/endpoints/charts/user/drive.ts b/src/server/api/endpoints/charts/user/drive.ts index d320887950..092f697f5d 100644 --- a/src/server/api/endpoints/charts/user/drive.ts +++ b/src/server/api/endpoints/charts/user/drive.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import getParams from '../../../get-params'; -import { perUserDriveStats } from '../../../../../services/stats'; +import perUserDriveChart from '../../../../../chart/per-user-drive'; import ID from '../../../../../misc/cafy-id'; export const meta = { desc: { - 'ja-JP': 'ユーザーごとのドライブの統計を取得します。' + 'ja-JP': 'ユーザーごとのドライブのチャートを取得します。' }, params: { @@ -35,7 +35,7 @@ export default (params: any) => new Promise(async (res, rej) => { const [ps, psErr] = getParams(meta, params); if (psErr) throw psErr; - const stats = await perUserDriveStats.getChart(ps.span as any, ps.limit, ps.userId); + const stats = await perUserDriveChart.getChart(ps.span as any, ps.limit, ps.userId); res(stats); }); diff --git a/src/server/api/endpoints/charts/user/following.ts b/src/server/api/endpoints/charts/user/following.ts index dbb2b46df9..7918b9a9d5 100644 --- a/src/server/api/endpoints/charts/user/following.ts +++ b/src/server/api/endpoints/charts/user/following.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import getParams from '../../../get-params'; -import { perUserFollowingStats } from '../../../../../services/stats'; +import perUserFollowingChart from '../../../../../chart/per-user-following'; import ID from '../../../../../misc/cafy-id'; export const meta = { desc: { - 'ja-JP': 'ユーザーごとのフォロー/フォロワーの統計を取得します。' + 'ja-JP': 'ユーザーごとのフォロー/フォロワーのチャートを取得します。' }, params: { @@ -35,7 +35,7 @@ export default (params: any) => new Promise(async (res, rej) => { const [ps, psErr] = getParams(meta, params); if (psErr) throw psErr; - const stats = await perUserFollowingStats.getChart(ps.span as any, ps.limit, ps.userId); + const stats = await perUserFollowingChart.getChart(ps.span as any, ps.limit, ps.userId); res(stats); }); diff --git a/src/server/api/endpoints/charts/user/notes.ts b/src/server/api/endpoints/charts/user/notes.ts index a256ed96f9..cd028d88a2 100644 --- a/src/server/api/endpoints/charts/user/notes.ts +++ b/src/server/api/endpoints/charts/user/notes.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import getParams from '../../../get-params'; -import { perUserNotesStats } from '../../../../../services/stats'; +import perUserNotesChart from '../../../../../chart/per-user-notes'; import ID from '../../../../../misc/cafy-id'; export const meta = { desc: { - 'ja-JP': 'ユーザーごとの投稿の統計を取得します。' + 'ja-JP': 'ユーザーごとの投稿のチャートを取得します。' }, params: { @@ -35,7 +35,7 @@ export default (params: any) => new Promise(async (res, rej) => { const [ps, psErr] = getParams(meta, params); if (psErr) throw psErr; - const stats = await perUserNotesStats.getChart(ps.span as any, ps.limit, ps.userId); + const stats = await perUserNotesChart.getChart(ps.span as any, ps.limit, ps.userId); res(stats); }); diff --git a/src/server/api/endpoints/charts/user/reactions.ts b/src/server/api/endpoints/charts/user/reactions.ts index 1d1e7d5a44..8632044ffa 100644 --- a/src/server/api/endpoints/charts/user/reactions.ts +++ b/src/server/api/endpoints/charts/user/reactions.ts @@ -1,11 +1,11 @@ import $ from 'cafy'; import getParams from '../../../get-params'; -import { perUserReactionsStats } from '../../../../../services/stats'; +import perUserReactionsChart from '../../../../../chart/per-user-reactions'; import ID from '../../../../../misc/cafy-id'; export const meta = { desc: { - 'ja-JP': 'ユーザーごとの被リアクション数の統計を取得します。' + 'ja-JP': 'ユーザーごとの被リアクション数のチャートを取得します。' }, params: { @@ -35,7 +35,7 @@ export default (params: any) => new Promise(async (res, rej) => { const [ps, psErr] = getParams(meta, params); if (psErr) throw psErr; - const stats = await perUserReactionsStats.getChart(ps.span as any, ps.limit, ps.userId); + const stats = await perUserReactionsChart.getChart(ps.span as any, ps.limit, ps.userId); res(stats); }); diff --git a/src/server/api/endpoints/charts/users.ts b/src/server/api/endpoints/charts/users.ts index 78d35fb645..48dc31c882 100644 --- a/src/server/api/endpoints/charts/users.ts +++ b/src/server/api/endpoints/charts/users.ts @@ -1,10 +1,10 @@ import $ from 'cafy'; import getParams from '../../get-params'; -import { usersStats } from '../../../../services/stats'; +import usersChart from '../../../../chart/users'; export const meta = { desc: { - 'ja-JP': 'ユーザーの統計を取得します。' + 'ja-JP': 'ユーザーのチャートを取得します。' }, params: { @@ -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 usersStats.getChart(ps.span as any, ps.limit); + const stats = await usersChart.getChart(ps.span as any, ps.limit); res(stats); }); |