refactor: remove upload and web-api routes, migrate to new controller structure
Deploy FileDrop / deploy (push) Failing after 12s

- Deleted `upload.ts` and `web-api.ts` routes, consolidating logic into dedicated controllers.
- Updated import paths in tests to reflect new controller structure.
- Refactored Telegram API utilities to utilize a bot pool for improved bot management and error handling.
- Enhanced environment variable tests to ensure additional bot tokens are correctly populated.
- Adjusted S3 bucket configuration tests to align with new controller imports.
- Updated Telegram queue implementation to reflect new infrastructure organization.
This commit is contained in:
Claude
2026-07-29 07:28:30 +07:00
parent 73adb5f58e
commit ea87397801
23 changed files with 90 additions and 2389 deletions
+3 -3
View File
@@ -3,18 +3,18 @@ import { beforeEach, describe, expect, it, mock } from 'bun:test';
// Mock database layer
const mockExecute = mock(() => Promise.resolve());
mock.module('../src/db/index', () => ({
mock.module('../src/infrastructure/persistence/drizzle/index', () => ({
db: {
execute: mockExecute,
},
}));
describe('Health Route Handler', () => {
let handleHealth: typeof import('../src/routes/health').handleHealth;
let handleHealth: typeof import('../src/interfaces/http/controllers/health-controller').handleHealth;
beforeEach(async () => {
mockExecute.mockClear();
const healthRoute = await import('../src/routes/health');
const healthRoute = await import('../src/interfaces/http/controllers/health-controller');
handleHealth = healthRoute.handleHealth;
});