From 308bcef08a5f86665e75e10d8210d0d51176100c Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 8 Feb 2019 04:31:33 +0900 Subject: [PATCH] Refactoring: Move chart dir into services dir --- src/remote/activitypub/models/person.ts | 2 +- src/server/api/endpoints/charts/active-users.ts | 2 +- src/server/api/endpoints/charts/drive.ts | 2 +- src/server/api/endpoints/charts/federation.ts | 2 +- src/server/api/endpoints/charts/hashtag.ts | 2 +- src/server/api/endpoints/charts/network.ts | 2 +- src/server/api/endpoints/charts/notes.ts | 2 +- src/server/api/endpoints/charts/user/drive.ts | 2 +- src/server/api/endpoints/charts/user/following.ts | 2 +- src/server/api/endpoints/charts/user/notes.ts | 2 +- src/server/api/endpoints/charts/user/reactions.ts | 2 +- src/server/api/endpoints/charts/users.ts | 2 +- src/server/api/endpoints/notes/hybrid-timeline.ts | 2 +- src/server/api/endpoints/notes/local-timeline.ts | 2 +- src/server/api/endpoints/notes/timeline.ts | 2 +- src/server/api/endpoints/stats.ts | 4 ++-- src/server/api/private/signup.ts | 2 +- src/server/index.ts | 2 +- src/services/blocking/create.ts | 2 +- src/{ => services}/chart/active-users.ts | 2 +- src/{ => services}/chart/drive.ts | 4 ++-- src/{ => services}/chart/federation.ts | 2 +- src/{ => services}/chart/hashtag.ts | 4 ++-- src/{ => services}/chart/index.ts | 4 ++-- src/{ => services}/chart/network.ts | 0 src/{ => services}/chart/notes.ts | 4 ++-- src/{ => services}/chart/per-user-drive.ts | 2 +- src/{ => services}/chart/per-user-following.ts | 4 ++-- src/{ => services}/chart/per-user-notes.ts | 4 ++-- src/{ => services}/chart/per-user-reactions.ts | 4 ++-- src/{ => services}/chart/users.ts | 2 +- src/services/drive/add-file.ts | 4 ++-- src/services/drive/delete-file.ts | 4 ++-- src/services/following/create.ts | 2 +- src/services/following/delete.ts | 2 +- src/services/following/requests/accept.ts | 2 +- src/services/note/create.ts | 6 +++--- src/services/note/delete.ts | 4 ++-- src/services/note/reaction/create.ts | 2 +- src/services/register-hashtag.ts | 2 +- src/services/register-or-fetch-instance-doc.ts | 2 +- 41 files changed, 53 insertions(+), 53 deletions(-) rename src/{ => services}/chart/active-users.ts (93%) rename src/{ => services}/chart/drive.ts (95%) rename src/{ => services}/chart/federation.ts (95%) rename src/{ => services}/chart/hashtag.ts (91%) rename src/{ => services}/chart/index.ts (99%) rename src/{ => services}/chart/network.ts (100%) rename src/{ => services}/chart/notes.ts (95%) rename src/{ => services}/chart/per-user-drive.ts (96%) rename src/{ => services}/chart/per-user-following.ts (95%) rename src/{ => services}/chart/per-user-notes.ts (94%) rename src/{ => services}/chart/per-user-reactions.ts (89%) rename src/{ => services}/chart/users.ts (95%) diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 2902b4b7f..c3b26b657 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -9,7 +9,7 @@ import { isCollectionOrOrderedCollection, isCollection, IPerson } from '../type' import { IDriveFile } from '../../../models/drive-file'; import Meta from '../../../models/meta'; import { fromHtml } from '../../../mfm/fromHtml'; -import usersChart from '../../../chart/users'; +import usersChart from '../../../services/chart/users'; import { URL } from 'url'; import { resolveNote, extractEmojis } from './note'; import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc'; diff --git a/src/server/api/endpoints/charts/active-users.ts b/src/server/api/endpoints/charts/active-users.ts index 5187e5b35..828edd5e9 100644 --- a/src/server/api/endpoints/charts/active-users.ts +++ b/src/server/api/endpoints/charts/active-users.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import define from '../../define'; -import activeUsersChart from '../../../../chart/active-users'; +import activeUsersChart from '../../../../services/chart/active-users'; export const meta = { stability: 'stable', diff --git a/src/server/api/endpoints/charts/drive.ts b/src/server/api/endpoints/charts/drive.ts index 2fd0139e8..072aec672 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 define from '../../define'; -import driveChart from '../../../../chart/drive'; +import driveChart from '../../../../services/chart/drive'; export const meta = { stability: 'stable', diff --git a/src/server/api/endpoints/charts/federation.ts b/src/server/api/endpoints/charts/federation.ts index f7d12e5c3..3a433e7aa 100644 --- a/src/server/api/endpoints/charts/federation.ts +++ b/src/server/api/endpoints/charts/federation.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import define from '../../define'; -import federationChart from '../../../../chart/federation'; +import federationChart from '../../../../services/chart/federation'; export const meta = { stability: 'stable', diff --git a/src/server/api/endpoints/charts/hashtag.ts b/src/server/api/endpoints/charts/hashtag.ts index 3df2dd850..496afae99 100644 --- a/src/server/api/endpoints/charts/hashtag.ts +++ b/src/server/api/endpoints/charts/hashtag.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import define from '../../define'; -import hashtagChart from '../../../../chart/hashtag'; +import hashtagChart from '../../../../services/chart/hashtag'; export const meta = { stability: 'stable', diff --git a/src/server/api/endpoints/charts/network.ts b/src/server/api/endpoints/charts/network.ts index af5b799a8..7dd7f905f 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 define from '../../define'; -import networkChart from '../../../../chart/network'; +import networkChart from '../../../../services/chart/network'; export const meta = { stability: 'stable', diff --git a/src/server/api/endpoints/charts/notes.ts b/src/server/api/endpoints/charts/notes.ts index 906cef1fa..5019e1ec9 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 define from '../../define'; -import notesChart from '../../../../chart/notes'; +import notesChart from '../../../../services/chart/notes'; export const meta = { stability: 'stable', diff --git a/src/server/api/endpoints/charts/user/drive.ts b/src/server/api/endpoints/charts/user/drive.ts index 1ef133c6b..cea8ac6fa 100644 --- a/src/server/api/endpoints/charts/user/drive.ts +++ b/src/server/api/endpoints/charts/user/drive.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import define from '../../../define'; -import perUserDriveChart from '../../../../../chart/per-user-drive'; +import perUserDriveChart from '../../../../../services/chart/per-user-drive'; import ID, { transform } from '../../../../../misc/cafy-id'; export const meta = { diff --git a/src/server/api/endpoints/charts/user/following.ts b/src/server/api/endpoints/charts/user/following.ts index c8a64455e..63f96dd24 100644 --- a/src/server/api/endpoints/charts/user/following.ts +++ b/src/server/api/endpoints/charts/user/following.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import define from '../../../define'; -import perUserFollowingChart from '../../../../../chart/per-user-following'; +import perUserFollowingChart from '../../../../../services/chart/per-user-following'; import ID, { transform } from '../../../../../misc/cafy-id'; export const meta = { diff --git a/src/server/api/endpoints/charts/user/notes.ts b/src/server/api/endpoints/charts/user/notes.ts index f8a3c726e..109e32e54 100644 --- a/src/server/api/endpoints/charts/user/notes.ts +++ b/src/server/api/endpoints/charts/user/notes.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import define from '../../../define'; -import perUserNotesChart from '../../../../../chart/per-user-notes'; +import perUserNotesChart from '../../../../../services/chart/per-user-notes'; import ID, { transform } from '../../../../../misc/cafy-id'; export const meta = { diff --git a/src/server/api/endpoints/charts/user/reactions.ts b/src/server/api/endpoints/charts/user/reactions.ts index f24c84593..bf46b708b 100644 --- a/src/server/api/endpoints/charts/user/reactions.ts +++ b/src/server/api/endpoints/charts/user/reactions.ts @@ -1,6 +1,6 @@ import $ from 'cafy'; import define from '../../../define'; -import perUserReactionsChart from '../../../../../chart/per-user-reactions'; +import perUserReactionsChart from '../../../../../services/chart/per-user-reactions'; import ID, { transform } from '../../../../../misc/cafy-id'; export const meta = { diff --git a/src/server/api/endpoints/charts/users.ts b/src/server/api/endpoints/charts/users.ts index 00c287114..593fc7c19 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 define from '../../define'; -import usersChart from '../../../../chart/users'; +import usersChart from '../../../../services/chart/users'; export const meta = { stability: 'stable', diff --git a/src/server/api/endpoints/notes/hybrid-timeline.ts b/src/server/api/endpoints/notes/hybrid-timeline.ts index 55b6af913..f1ef7cea1 100644 --- a/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -6,7 +6,7 @@ import { packMany } from '../../../../models/note'; import define from '../../define'; import { countIf } from '../../../../prelude/array'; import fetchMeta from '../../../../misc/fetch-meta'; -import activeUsersChart from '../../../../chart/active-users'; +import activeUsersChart from '../../../../services/chart/active-users'; import { getHideUserIds } from '../../common/get-hide-users'; export const meta = { diff --git a/src/server/api/endpoints/notes/local-timeline.ts b/src/server/api/endpoints/notes/local-timeline.ts index 5d6e4b2e1..d3bc7dc6e 100644 --- a/src/server/api/endpoints/notes/local-timeline.ts +++ b/src/server/api/endpoints/notes/local-timeline.ts @@ -5,7 +5,7 @@ import { packMany } from '../../../../models/note'; import define from '../../define'; import { countIf } from '../../../../prelude/array'; import fetchMeta from '../../../../misc/fetch-meta'; -import activeUsersChart from '../../../../chart/active-users'; +import activeUsersChart from '../../../../services/chart/active-users'; import { getHideUserIds } from '../../common/get-hide-users'; export const meta = { diff --git a/src/server/api/endpoints/notes/timeline.ts b/src/server/api/endpoints/notes/timeline.ts index b0b02c4c9..20bb7f790 100644 --- a/src/server/api/endpoints/notes/timeline.ts +++ b/src/server/api/endpoints/notes/timeline.ts @@ -5,7 +5,7 @@ import { getFriends } from '../../common/get-friends'; import { packMany } from '../../../../models/note'; import define from '../../define'; import { countIf } from '../../../../prelude/array'; -import activeUsersChart from '../../../../chart/active-users'; +import activeUsersChart from '../../../../services/chart/active-users'; import { getHideUserIds } from '../../common/get-hide-users'; export const meta = { diff --git a/src/server/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts index 79e2fdf5e..bb5b1a6ad 100644 --- a/src/server/api/endpoints/stats.ts +++ b/src/server/api/endpoints/stats.ts @@ -1,6 +1,6 @@ import define from '../define'; -import driveChart from '../../../chart/drive'; -import federationChart from '../../../chart/federation'; +import driveChart from '../../../services/chart/drive'; +import federationChart from '../../../services/chart/federation'; import fetchMeta from '../../../misc/fetch-meta'; export const meta = { diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index 6318eabdb..89b7b330d 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -6,7 +6,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 usersChart from '../../../chart/users'; +import usersChart from '../../../services/chart/users'; import fetchMeta from '../../../misc/fetch-meta'; import * as recaptcha from 'recaptcha-promise'; diff --git a/src/server/index.ts b/src/server/index.ts index 0e1c70105..470562d80 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -19,7 +19,7 @@ import activityPub from './activitypub'; import nodeinfo from './nodeinfo'; import wellKnown from './well-known'; import config from '../config'; -import networkChart from '../chart/network'; +import networkChart from '../services/chart/network'; import apiServer from './api'; import { sum } from '../prelude/array'; import User from '../models/user'; diff --git a/src/services/blocking/create.ts b/src/services/blocking/create.ts index 2b46d6b94..c20666ef2 100644 --- a/src/services/blocking/create.ts +++ b/src/services/blocking/create.ts @@ -8,7 +8,7 @@ import renderUndo from '../../remote/activitypub/renderer/undo'; import renderBlock from '../../remote/activitypub/renderer/block'; import { deliver } from '../../queue'; import renderReject from '../../remote/activitypub/renderer/reject'; -import perUserFollowingChart from '../../chart/per-user-following'; +import perUserFollowingChart from '../../services/chart/per-user-following'; import Blocking from '../../models/blocking'; export default async function(blocker: IUser, blockee: IUser) { diff --git a/src/chart/active-users.ts b/src/services/chart/active-users.ts similarity index 93% rename from src/chart/active-users.ts rename to src/services/chart/active-users.ts index 06d9b8aa9..2a4e1a97a 100644 --- a/src/chart/active-users.ts +++ b/src/services/chart/active-users.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from '.'; -import { IUser, isLocalUser } from '../models/user'; +import { IUser, isLocalUser } from '../../models/user'; /** * アクティブユーザーに関するチャート diff --git a/src/chart/drive.ts b/src/services/chart/drive.ts similarity index 95% rename from src/chart/drive.ts rename to src/services/chart/drive.ts index ff454c750..972f8c570 100644 --- a/src/chart/drive.ts +++ b/src/services/chart/drive.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from './'; -import DriveFile, { IDriveFile } from '../models/drive-file'; -import { isLocalUser } from '../models/user'; +import DriveFile, { IDriveFile } from '../../models/drive-file'; +import { isLocalUser } from '../../models/user'; /** * ドライブに関するチャート diff --git a/src/chart/federation.ts b/src/services/chart/federation.ts similarity index 95% rename from src/chart/federation.ts rename to src/services/chart/federation.ts index 5bb41f00a..20da7a742 100644 --- a/src/chart/federation.ts +++ b/src/services/chart/federation.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from '.'; -import Instance from '../models/instance'; +import Instance from '../../models/instance'; /** * フェデレーションに関するチャート diff --git a/src/chart/hashtag.ts b/src/services/chart/hashtag.ts similarity index 91% rename from src/chart/hashtag.ts rename to src/services/chart/hashtag.ts index 5b03d8ba3..7a31e9cce 100644 --- a/src/chart/hashtag.ts +++ b/src/services/chart/hashtag.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from './'; -import { IUser, isLocalUser } from '../models/user'; -import db from '../db/mongodb'; +import { IUser, isLocalUser } from '../../models/user'; +import db from '../../db/mongodb'; /** * ハッシュタグに関するチャート diff --git a/src/chart/index.ts b/src/services/chart/index.ts similarity index 99% rename from src/chart/index.ts rename to src/services/chart/index.ts index cf61d9073..30ef2847d 100644 --- a/src/chart/index.ts +++ b/src/services/chart/index.ts @@ -6,9 +6,9 @@ import * as moment from 'moment'; import * as nestedProperty from 'nested-property'; import autobind from 'autobind-decorator'; import * as mongo from 'mongodb'; -import db from '../db/mongodb'; +import db from '../../db/mongodb'; import { ICollection } from 'monk'; -import Logger from '../misc/logger'; +import Logger from '../../misc/logger'; const logger = new Logger('chart'); diff --git a/src/chart/network.ts b/src/services/chart/network.ts similarity index 100% rename from src/chart/network.ts rename to src/services/chart/network.ts diff --git a/src/chart/notes.ts b/src/services/chart/notes.ts similarity index 95% rename from src/chart/notes.ts rename to src/services/chart/notes.ts index 738778e72..8f95f6363 100644 --- a/src/chart/notes.ts +++ b/src/services/chart/notes.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from '.'; -import Note, { INote } from '../models/note'; -import { isLocalUser } from '../models/user'; +import Note, { INote } from '../../models/note'; +import { isLocalUser } from '../../models/user'; /** * 投稿に関するチャート diff --git a/src/chart/per-user-drive.ts b/src/services/chart/per-user-drive.ts similarity index 96% rename from src/chart/per-user-drive.ts rename to src/services/chart/per-user-drive.ts index 3decedeb3..d23852bdd 100644 --- a/src/chart/per-user-drive.ts +++ b/src/services/chart/per-user-drive.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from './'; -import DriveFile, { IDriveFile } from '../models/drive-file'; +import DriveFile, { IDriveFile } from '../../models/drive-file'; /** * ユーザーごとのドライブに関するチャート diff --git a/src/chart/per-user-following.ts b/src/services/chart/per-user-following.ts similarity index 95% rename from src/chart/per-user-following.ts rename to src/services/chart/per-user-following.ts index fac4a1619..9d6d347ef 100644 --- a/src/chart/per-user-following.ts +++ b/src/services/chart/per-user-following.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from './'; -import Following from '../models/following'; -import { IUser, isLocalUser } from '../models/user'; +import Following from '../../models/following'; +import { IUser, isLocalUser } from '../../models/user'; /** * ユーザーごとのフォローに関するチャート diff --git a/src/chart/per-user-notes.ts b/src/services/chart/per-user-notes.ts similarity index 94% rename from src/chart/per-user-notes.ts rename to src/services/chart/per-user-notes.ts index 9558f5c83..9ce4e67c5 100644 --- a/src/chart/per-user-notes.ts +++ b/src/services/chart/per-user-notes.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from './'; -import Note, { INote } from '../models/note'; -import { IUser } from '../models/user'; +import Note, { INote } from '../../models/note'; +import { IUser } from '../../models/user'; /** * ユーザーごとの投稿に関するチャート diff --git a/src/chart/per-user-reactions.ts b/src/services/chart/per-user-reactions.ts similarity index 89% rename from src/chart/per-user-reactions.ts rename to src/services/chart/per-user-reactions.ts index a31952ea2..60495aeb0 100644 --- a/src/chart/per-user-reactions.ts +++ b/src/services/chart/per-user-reactions.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; import Chart from './'; -import { IUser, isLocalUser } from '../models/user'; -import { INote } from '../models/note'; +import { IUser, isLocalUser } from '../../models/user'; +import { INote } from '../../models/note'; /** * ユーザーごとのリアクションに関するチャート diff --git a/src/chart/users.ts b/src/services/chart/users.ts similarity index 95% rename from src/chart/users.ts rename to src/services/chart/users.ts index 547e595b0..ce23209ae 100644 --- a/src/chart/users.ts +++ b/src/services/chart/users.ts @@ -1,6 +1,6 @@ import autobind from 'autobind-decorator'; import Chart, { Obj } from './'; -import User, { IUser, isLocalUser } from '../models/user'; +import User, { IUser, isLocalUser } from '../../models/user'; /** * ユーザーに関するチャート diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts index 31902b242..0e588d344 100644 --- a/src/services/drive/add-file.ts +++ b/src/services/drive/add-file.ts @@ -18,8 +18,8 @@ import delFile from './delete-file'; import config from '../../config'; import { getDriveFileWebpublicBucket } from '../../models/drive-file-webpublic'; import { getDriveFileThumbnailBucket } from '../../models/drive-file-thumbnail'; -import driveChart from '../../chart/drive'; -import perUserDriveChart from '../../chart/per-user-drive'; +import driveChart from '../../services/chart/drive'; +import perUserDriveChart from '../../services/chart/per-user-drive'; import fetchMeta from '../../misc/fetch-meta'; import { GenerateVideoThumbnail } from './generate-video-thumbnail'; import { driveLogger } from './logger'; diff --git a/src/services/drive/delete-file.ts b/src/services/drive/delete-file.ts index 609c3a86e..4211cd829 100644 --- a/src/services/drive/delete-file.ts +++ b/src/services/drive/delete-file.ts @@ -2,8 +2,8 @@ import * as Minio from 'minio'; import DriveFile, { DriveFileChunk, IDriveFile } from '../../models/drive-file'; import DriveFileThumbnail, { DriveFileThumbnailChunk } from '../../models/drive-file-thumbnail'; import config from '../../config'; -import driveChart from '../../chart/drive'; -import perUserDriveChart from '../../chart/per-user-drive'; +import driveChart from '../../services/chart/drive'; +import perUserDriveChart from '../../services/chart/per-user-drive'; import DriveFileWebpublic, { DriveFileWebpublicChunk } from '../../models/drive-file-webpublic'; export default async function(file: IDriveFile, isExpired = false) { diff --git a/src/services/following/create.ts b/src/services/following/create.ts index 4df271a97..65b80dcf8 100644 --- a/src/services/following/create.ts +++ b/src/services/following/create.ts @@ -9,7 +9,7 @@ import renderAccept from '../../remote/activitypub/renderer/accept'; import renderReject from '../../remote/activitypub/renderer/reject'; import { deliver } from '../../queue'; import createFollowRequest from './requests/create'; -import perUserFollowingChart from '../../chart/per-user-following'; +import perUserFollowingChart from '../../services/chart/per-user-following'; import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc'; import Instance from '../../models/instance'; diff --git a/src/services/following/delete.ts b/src/services/following/delete.ts index d56edd3cc..87eaf826e 100644 --- a/src/services/following/delete.ts +++ b/src/services/following/delete.ts @@ -5,7 +5,7 @@ import { renderActivity } from '../../remote/activitypub/renderer'; import renderFollow from '../../remote/activitypub/renderer/follow'; import renderUndo from '../../remote/activitypub/renderer/undo'; import { deliver } from '../../queue'; -import perUserFollowingChart from '../../chart/per-user-following'; +import perUserFollowingChart from '../../services/chart/per-user-following'; import Logger from '../../misc/logger'; const logger = new Logger('following/delete'); diff --git a/src/services/following/requests/accept.ts b/src/services/following/requests/accept.ts index 8c42b5a78..34c7036d1 100644 --- a/src/services/following/requests/accept.ts +++ b/src/services/following/requests/accept.ts @@ -6,7 +6,7 @@ import renderAccept from '../../../remote/activitypub/renderer/accept'; import { deliver } from '../../../queue'; import Following from '../../../models/following'; import { publishMainStream } from '../../stream'; -import perUserFollowingChart from '../../../chart/per-user-following'; +import perUserFollowingChart from '../../../services/chart/per-user-following'; import Logger from '../../../misc/logger'; const logger = new Logger('following/requests/accept'); diff --git a/src/services/note/create.ts b/src/services/note/create.ts index d47f4ea9f..0b71a9670 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -21,9 +21,9 @@ import Meta from '../../models/meta'; import config from '../../config'; import registerHashtag from '../register-hashtag'; import isQuote from '../../misc/is-quote'; -import notesChart from '../../chart/notes'; -import perUserNotesChart from '../../chart/per-user-notes'; -import activeUsersChart from '../../chart/active-users'; +import notesChart from '../../services/chart/notes'; +import perUserNotesChart from '../../services/chart/per-user-notes'; +import activeUsersChart from '../../services/chart/active-users'; import { erase, concat } from '../../prelude/array'; import insertNoteUnread from './unread'; diff --git a/src/services/note/delete.ts b/src/services/note/delete.ts index 557872d75..8e8c20bfc 100644 --- a/src/services/note/delete.ts +++ b/src/services/note/delete.ts @@ -6,8 +6,8 @@ import { renderActivity } from '../../remote/activitypub/renderer'; import { deliver } from '../../queue'; import Following from '../../models/following'; import renderTombstone from '../../remote/activitypub/renderer/tombstone'; -import notesChart from '../../chart/notes'; -import perUserNotesChart from '../../chart/per-user-notes'; +import notesChart from '../../services/chart/notes'; +import perUserNotesChart from '../../services/chart/per-user-notes'; import config from '../../config'; import NoteUnread from '../../models/note-unread'; import read from './read'; diff --git a/src/services/note/reaction/create.ts b/src/services/note/reaction/create.ts index e6a9fe7d6..cf7292764 100644 --- a/src/services/note/reaction/create.ts +++ b/src/services/note/reaction/create.ts @@ -8,7 +8,7 @@ import watch from '../watch'; import renderLike from '../../../remote/activitypub/renderer/like'; import { deliver } from '../../../queue'; import { renderActivity } from '../../../remote/activitypub/renderer'; -import perUserReactionsChart from '../../../chart/per-user-reactions'; +import perUserReactionsChart from '../../../services/chart/per-user-reactions'; export default async (user: IUser, note: INote, reaction: string) => new Promise(async (res, rej) => { // Myself diff --git a/src/services/register-hashtag.ts b/src/services/register-hashtag.ts index 57ba2080f..01b7bc871 100644 --- a/src/services/register-hashtag.ts +++ b/src/services/register-hashtag.ts @@ -1,6 +1,6 @@ import { IUser } from '../models/user'; import Hashtag from '../models/hashtag'; -import hashtagChart from '../chart/hashtag'; +import hashtagChart from '../services/chart/hashtag'; export default async function(user: IUser, tag: string) { tag = tag.toLowerCase(); diff --git a/src/services/register-or-fetch-instance-doc.ts b/src/services/register-or-fetch-instance-doc.ts index 3b338b48a..d418cd12c 100644 --- a/src/services/register-or-fetch-instance-doc.ts +++ b/src/services/register-or-fetch-instance-doc.ts @@ -1,5 +1,5 @@ import Instance, { IInstance } from '../models/instance'; -import federationChart from '../chart/federation'; +import federationChart from '../services/chart/federation'; export async function registerOrFetchInstanceDoc(host: string): Promise { if (host == null) return null;