fix: resolve code review issues - import paths and structure cleanup
- Fix infrastructure imports: chunked-storage uses new path for shared/utils and interfaces/s3 - Fix health-controller: imports from infrastructure/persistence/drizzle instead of old db/ - Fix routes/index.ts: imports from new interfaces/s3 and middleware paths - Marked Telegram-specific types in shared/utils/file.ts as future extraction Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,9 +2,9 @@ import { createReadStream } from 'node:fs';
|
||||
import { gzipSync } from 'node:zlib';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { config } from '../../env';
|
||||
import { computeHash } from '../../utils/file';
|
||||
import { createGetObjectResponse, type ObjectPartSource } from '../../utils/s3/object-stream';
|
||||
import type { RangeParseResult } from '../../utils/s3/range';
|
||||
import { computeHash } from '../../shared/utils/file';
|
||||
import { createGetObjectResponse, type ObjectPartSource } from '../../interfaces/s3/object-stream';
|
||||
import type { RangeParseResult } from '../../interfaces/s3/range';
|
||||
import type { IFileRepository } from '../../domain/ports/file-repository';
|
||||
import type { IFilePartRepository } from '../../domain/ports/file-part-repository';
|
||||
import type { ITelegramService } from '../../domain/ports/telegram-service';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { sql } from 'drizzle-orm';
|
||||
import { db } from '../../../db';
|
||||
import { db } from '../../../infrastructure/persistence/drizzle/index';
|
||||
import { getErrorMessage } from '../../../shared/utils/file';
|
||||
import logger from '../../../utils/logger';
|
||||
import logger from '../../../shared/logger/index';
|
||||
|
||||
/**
|
||||
* Handles the health-check endpoint.
|
||||
|
||||
@@ -7,9 +7,9 @@ import { handleS3Request } from '../controllers/s3-controller';
|
||||
import { handleSwaggerHtml, handleSwaggerJson } from '../../../routes/swagger';
|
||||
import { handleUpload } from '../controllers/upload-controller';
|
||||
import { handleWebApiV1 } from '../controllers/web-api-controller';
|
||||
import { requireAuth } from '../../../utils/auth';
|
||||
import { withRateLimit } from '../../../utils/rateLimit';
|
||||
import { isS3Request } from '../../../utils/s3/auth';
|
||||
import { requireAuth } from '../middleware/auth';
|
||||
import { withRateLimit } from '../middleware/rate-limit';
|
||||
import { isS3Request } from '../../s3/auth';
|
||||
import { extractS3BucketFromHost } from '../../../utils/s3/virtual-host';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user