fix(dispose-cache): dispose more caches

This commit is contained in:
オスカー、 2024-08-26 02:00:38 +09:00
parent 77e81505b7
commit a92cd9262b
Signed by: SWREI
GPG Key ID: 139D6573F92DA9F7

View File

@ -6,6 +6,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js'; import { Endpoint } from '@/server/api/endpoint-base.js';
import { CacheService } from '@/core/CacheService.js'; import { CacheService } from '@/core/CacheService.js';
import { ApDbResolverService } from '@/core/activitypub/ApDbResolverService.js';
import {AuthenticateService} from "@/server/api/AuthenticateService.js";
export const meta = { export const meta = {
tags: ['admin'], tags: ['admin'],
@ -25,9 +27,13 @@ export const paramDef = {
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
constructor( constructor(
private cacheService: CacheService, private cacheService: CacheService,
private apDbResolverService: ApDbResolverService,
private authenticateService: AuthenticateService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
this.cacheService.dispose(); this.cacheService.dispose();
this.apDbResolverService.dispose();
this.authenticateService.dispose()
}); });
} }
} }