summaryrefslogtreecommitdiff
path: root/src/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api')
-rw-r--r--src/server/api/endpoints/charts/drive.ts6
-rw-r--r--src/server/api/endpoints/charts/hashtag.ts6
-rw-r--r--src/server/api/endpoints/charts/network.ts6
-rw-r--r--src/server/api/endpoints/charts/notes.ts6
-rw-r--r--src/server/api/endpoints/charts/user/drive.ts6
-rw-r--r--src/server/api/endpoints/charts/user/following.ts6
-rw-r--r--src/server/api/endpoints/charts/user/notes.ts6
-rw-r--r--src/server/api/endpoints/charts/user/reactions.ts6
-rw-r--r--src/server/api/endpoints/charts/users.ts6
-rw-r--r--src/server/api/private/signup.ts4
10 files changed, 29 insertions, 29 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);
});
diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts
index caab0267c4..d6eba69817 100644
--- a/src/server/api/private/signup.ts
+++ b/src/server/api/private/signup.ts
@@ -7,7 +7,7 @@ import generateUserToken from '../common/generate-native-user-token';
import config from '../../../config';
import Meta from '../../../models/meta';
import RegistrationTicket from '../../../models/registration-tickets';
-import { usersStats } from '../../../services/stats';
+import usersChart from '../../../chart/users';
if (config.recaptcha) {
recaptcha.init({
@@ -130,7 +130,7 @@ export default async (ctx: Koa.Context) => {
}, { upsert: true });
//#endregion
- usersStats.update(account, true);
+ usersChart.update(account, true);
const res = await pack(account, account, {
detail: true,