Skip to content

Commit

Permalink
remove reactionsCount from stats endpoint (#224)
Browse files Browse the repository at this point in the history
* release reactionsCount from stats endpoint

* docs(changelog): release reactionsCount from stats endpoint
  • Loading branch information
anatawa12 authored Aug 18, 2024
1 parent e84ca1d commit 3f8c7b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Unreleased

### Client

### Server
- Enhance: removed `reactionsCount` from `/api/stats` response due to performance reasons (#224)

## 2024.8.0 (merged to 2024.8.0-kinel.1)

### General
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/src/server/api/endpoints/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const originalUsersCount = usersChart.local.total[0];

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

0 comments on commit 3f8c7b2

Please sign in to comment.