fix: 移除 FilesService 中的 RateLimitService 注入
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 56s
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 56s
RateLimitService 未在 @Global Module 中,feature module 无法注入。 限流后续通过 Guard/Interceptor 统一处理。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
ca90d34b22
commit
3137d58a5d
@ -6,7 +6,6 @@ import {
|
||||
import { FilesRepository } from './files.repository';
|
||||
import { StorageService } from '../../infrastructure/storage/storage.service';
|
||||
import { CosStorageProvider } from '../../infrastructure/storage/cos-storage.provider';
|
||||
import { RateLimitService } from '../../common/utils/rate-limit.service';
|
||||
import { CreateUploadUrlDto, CompleteUploadDto } from './dto';
|
||||
|
||||
@Injectable()
|
||||
@ -15,11 +14,9 @@ export class FilesService {
|
||||
private readonly repository: FilesRepository,
|
||||
private readonly storage: StorageService,
|
||||
private readonly cos: CosStorageProvider,
|
||||
private readonly rateLimit: RateLimitService,
|
||||
) {}
|
||||
|
||||
async requestUploadUrl(userId: string, dto: CreateUploadUrlDto) {
|
||||
await this.rateLimit.fileUploadLimit(userId);
|
||||
return this.storage.createUploadUrl(userId, {
|
||||
filename: dto.filename,
|
||||
mimeType: dto.mimeType,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user