mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-20 23:40:10 +00:00
fix DI in SkRateLimiterService
This commit is contained in:
parent
ffc2737478
commit
7698db88e5
1 changed files with 9 additions and 1 deletions
|
@ -3,12 +3,13 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import Redis from 'ioredis';
|
import Redis from 'ioredis';
|
||||||
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
import type { IEndpointMeta } from '@/server/api/endpoints.js';
|
||||||
import { LoggerService } from '@/core/LoggerService.js';
|
import { LoggerService } from '@/core/LoggerService.js';
|
||||||
import { TimeService } from '@/core/TimeService.js';
|
import { TimeService } from '@/core/TimeService.js';
|
||||||
import { EnvService } from '@/core/EnvService.js';
|
import { EnvService } from '@/core/EnvService.js';
|
||||||
|
import { DI } from '@/di-symbols.js';
|
||||||
import { RateLimiterService } from './RateLimiterService.js';
|
import { RateLimiterService } from './RateLimiterService.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,9 +112,16 @@ export function hasMinLimit(limit: LegacyRateLimit): limit is LegacyRateLimit &
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SkRateLimiterService extends RateLimiterService {
|
export class SkRateLimiterService extends RateLimiterService {
|
||||||
constructor(
|
constructor(
|
||||||
|
@Inject(TimeService)
|
||||||
private readonly timeService: TimeService,
|
private readonly timeService: TimeService,
|
||||||
|
|
||||||
|
@Inject(DI.redis)
|
||||||
redisClient: Redis.Redis,
|
redisClient: Redis.Redis,
|
||||||
|
|
||||||
|
@Inject(LoggerService)
|
||||||
loggerService: LoggerService,
|
loggerService: LoggerService,
|
||||||
|
|
||||||
|
@Inject(EnvService)
|
||||||
envService: EnvService,
|
envService: EnvService,
|
||||||
) {
|
) {
|
||||||
super(redisClient, loggerService, envService);
|
super(redisClient, loggerService, envService);
|
||||||
|
|
Loading…
Reference in a new issue