Skip to content

Commit

Permalink
reactionsCountを無効化
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Sep 11, 2024
1 parent 8f901de commit 70ee4bd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/backend/src/server/api/endpoints/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { Inject, Injectable } from '@nestjs/common';
import type { InstancesRepository, NoteReactionsRepository } from '@/models/_.js';
import type { InstancesRepository } from '@/models/_.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { DI } from '@/di-symbols.js';
import NotesChart from '@/core/chart/charts/notes.js';
Expand Down Expand Up @@ -63,9 +63,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
@Inject(DI.instancesRepository)
private instancesRepository: InstancesRepository,

@Inject(DI.noteReactionsRepository)
private noteReactionsRepository: NoteReactionsRepository,

private notesChart: NotesChart,
private usersChart: UsersChart,
) {
Expand All @@ -79,11 +76,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const originalUsersCount = usersChart.local.total[0];

const [
reactionsCount,
//originalReactionsCount,
instances,
] = await Promise.all([
this.noteReactionsRepository.count({ cache: 3600000 }), // 1 hour
//this.noteReactionsRepository.count({ where: { userHost: IsNull() }, cache: 3600000 }),
this.instancesRepository.count({ cache: 3600000 }),
]);
Expand All @@ -93,7 +88,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
originalNotesCount,
usersCount,
originalUsersCount,
reactionsCount,
reactionsCount: 0,
//originalReactionsCount,
instances,
driveUsageLocal: 0,
Expand Down

0 comments on commit 70ee4bd

Please sign in to comment.