This commit is contained in:
syuilo 2025-05-11 17:17:07 +09:00
parent a78f654322
commit b18d6b4cef
1 changed files with 1 additions and 3 deletions

View File

@ -18,7 +18,7 @@ type RateLimitInfo = {
} | {
code: 'RATE_LIMIT_EXCEEDED',
info: Limiter.LimiterInfo,
}
};
@Injectable()
export class RateLimiterService {
@ -68,7 +68,6 @@ export class RateLimiterService {
this.logger.debug(`${actor} ${limitation.key} min remaining: ${info.remaining}`);
if (info.remaining === 0) {
// eslint-disable-next-line no-throw-literal
return { code: 'BRIEF_REQUEST_INTERVAL', info };
}
}
@ -85,7 +84,6 @@ export class RateLimiterService {
this.logger.debug(`${actor} ${limitation.key} max remaining: ${info.remaining}`);
if (info.remaining === 0) {
// eslint-disable-next-line no-throw-literal
return { code: 'RATE_LIMIT_EXCEEDED', info };
}
}