diff --git a/packages/backend/src/server/api/EndpointsModule.ts b/packages/backend/src/server/api/EndpointsModule.ts index 48f1de701e36..799ba4498d73 100644 --- a/packages/backend/src/server/api/EndpointsModule.ts +++ b/packages/backend/src/server/api/EndpointsModule.ts @@ -350,7 +350,6 @@ import * as ep___fetchRss from './endpoints/fetch-rss.js'; import * as ep___retention from './endpoints/retention.js'; import { GetterService } from './GetterService.js'; import { ApiLoggerService } from './ApiLoggerService.js'; -import { ServerStatsService } from '@/daemons/ServerStatsService.js'; import type { Provider } from '@nestjs/common'; const $admin_meta: Provider = { provide: 'ep:admin/meta', useClass: ep___admin_meta.default }; @@ -703,7 +702,6 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention providers: [ GetterService, ApiLoggerService, - ServerStatsService, $admin_meta, $admin_abuseUserReports, $admin_accounts_create, diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 392a4a2c2ae8..17d5a1f9180c 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -4,12 +4,10 @@ */ import { Injectable } from '@nestjs/common'; -import { ModuleRef } from '@nestjs/core'; import type { MiMeta } from '@/models/entities/Meta.js'; import { ModerationLogService } from '@/core/ModerationLogService.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import { MetaService } from '@/core/MetaService.js'; -import { ServerStatsService } from '@/daemons/ServerStatsService.js'; export const meta = { tags: ['admin'], @@ -113,8 +111,6 @@ export const paramDef = { @Injectable() export default class extends Endpoint { // eslint-disable-line import/no-default-export constructor( - private moduleRef: ModuleRef, - private metaService: MetaService, private moderationLogService: ModerationLogService, ) { @@ -427,14 +423,6 @@ export default class extends Endpoint { // eslint- await this.metaService.update(set); this.moderationLogService.insertModerationLog(me, 'updateMeta'); - - if (set.enableServerMachineStats === true) { - const serverStatsService: ServerStatsService = await this.moduleRef.resolve(ServerStatsService); - await serverStatsService.start(); - } else { - const serverStatsService: ServerStatsService = await this.moduleRef.resolve(ServerStatsService); - serverStatsService.dispose(); - } }); } }