1
0
mirror of https://git.boykissers.com/pawkey/pawkey-sk.git synced 2025-12-20 12:14:18 +00:00

move all Rate Limit type defs to rate-limit-utils.ts

This commit is contained in:
Hazelnoot
2024-12-08 11:33:57 -05:00
parent 8b091f77ca
commit 7c002ce56e
7 changed files with 144 additions and 132 deletions

View File

@@ -6,8 +6,9 @@
import { KEYWORD } from 'color-convert/conversions.js';
import { jest } from '@jest/globals';
import type Redis from 'ioredis';
import { LegacyRateLimit, LimitCounter, RateLimit, SkRateLimiterService } from '@/server/api/SkRateLimiterService.js';
import { LimitCounter, SkRateLimiterService } from '@/server/api/SkRateLimiterService.js';
import { LoggerService } from '@/core/LoggerService.js';
import { BucketRateLimit, LegacyRateLimit } from '@/misc/rate-limit-utils.js';
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
@@ -141,7 +142,7 @@ describe(SkRateLimiterService, () => {
});
describe('with bucket limit', () => {
let limit: RateLimit = null!;
let limit: BucketRateLimit = null!;
beforeEach(() => {
limit = {