Refactor
This commit is contained in:
parent
f6c376f20d
commit
7121bdef6b
|
@ -1,6 +1,6 @@
|
|||
import { Notes } from '../models';
|
||||
|
||||
export default async function(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise<number> {
|
||||
export async function countSameRenotes(userId: string, renoteId: string, excludeNoteId: string | undefined): Promise<number> {
|
||||
// 指定したユーザーの指定したノートのリノートがいくつあるか数える
|
||||
const query = Notes.createQueryBuilder('note')
|
||||
.where('note.userId = :userId', { userId })
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { Note } from '../../models/entities/note';
|
|||
import { Notes, Users, Instances } from '../../models';
|
||||
import { notesChart, perUserNotesChart, instanceChart } from '../chart';
|
||||
import { deliverToFollowers } from '../../remote/activitypub/deliver-manager';
|
||||
import countSameRenotes from '../count-same-renotes';
|
||||
import { countSameRenotes } from '../../misc/count-same-renotes';
|
||||
|
||||
/**
|
||||
* 投稿を削除します。
|
||||
|
|
Loading…
Reference in New Issue