summaryrefslogtreecommitdiff
path: root/packages/backend/src/misc/count-same-renotes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/misc/count-same-renotes.ts')
-rw-r--r--packages/backend/src/misc/count-same-renotes.ts15
1 files changed, 0 insertions, 15 deletions
diff --git a/packages/backend/src/misc/count-same-renotes.ts b/packages/backend/src/misc/count-same-renotes.ts
deleted file mode 100644
index b7f8ce90c8..0000000000
--- a/packages/backend/src/misc/count-same-renotes.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Notes } from '@/models/index.js';
-
-export async function countSameRenotes(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise<number> {
- // 指定したユーザーの指定したノートのリノートがいくつあるか数える
- const query = Notes.createQueryBuilder('note')
- .where('note.userId = :userId', { userId })
- .andWhere('note.renoteId = :renoteId', { renoteId });
-
- // 指定した投稿を除く
- if (excludeNoteId) {
- query.andWhere('note.id != :excludeNoteId', { excludeNoteId });
- }
-
- return await query.getCount();
-}