From 7121bdef6b232294acda25b169be1e008a8812b6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 26 Feb 2020 07:56:32 +0900 Subject: [PATCH] Refactor --- src/{services => misc}/count-same-renotes.ts | 2 +- src/services/note/create.ts | 4 ++-- src/services/note/delete.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/{services => misc}/count-same-renotes.ts (77%) diff --git a/src/services/count-same-renotes.ts b/src/misc/count-same-renotes.ts similarity index 77% rename from src/services/count-same-renotes.ts rename to src/misc/count-same-renotes.ts index a20b4fbf8..0233bdf88 100644 --- a/src/services/count-same-renotes.ts +++ b/src/misc/count-same-renotes.ts @@ -1,6 +1,6 @@ import { Notes } from '../models'; -export default async function(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise { +export async function countSameRenotes(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise { // 指定したユーザーの指定したノートのリノートがいくつあるか数える const query = Notes.createQueryBuilder('note') .where('note.userId = :userId', { userId }) diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 98b173180..a10ee5164 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -30,7 +30,7 @@ import { isDuplicateKeyValueError } from '../../misc/is-duplicate-key-value-erro import { ensure } from '../../prelude/ensure'; import { checkHitAntenna } from '../../misc/check-hit-antenna'; import { addNoteToAntenna } from '../add-note-to-antenna'; -import countSameRenotes from '../count-same-renotes'; +import { countSameRenotes } from '../../misc/count-same-renotes'; type NotificationType = 'reply' | 'renote' | 'quote' | 'mention'; @@ -237,7 +237,7 @@ export default async (user: User, data: Option, silent = false) => new Promise