refactor: remove upload and web-api routes, migrate to new controller structure
Deploy FileDrop / deploy (push) Failing after 12s
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:
@@ -4,7 +4,7 @@ import { db, files as fileSchema } from '../db';
|
||||
import type { NewFile } from '../db/schema';
|
||||
import { config } from '../env';
|
||||
import { cleanupTempFile } from './file';
|
||||
import { forwardToStorage } from './telegram';
|
||||
import { botPool } from '../infrastructure/telegram/bot-pool';
|
||||
import { createZip, type ZipEntry } from './zip';
|
||||
|
||||
export type PreparedUpload = {
|
||||
@@ -86,7 +86,7 @@ const flushUploads = async (): Promise<void> => {
|
||||
);
|
||||
zipTempPath = zip.tempPath;
|
||||
const archiveFileName = `filedrop-${nanoid()}.zip`;
|
||||
const archiveResult = await forwardToStorage(
|
||||
const archiveResult = await botPool.forwardToStorage(
|
||||
createReadStream(zip.tempPath),
|
||||
archiveFileName,
|
||||
'document',
|
||||
|
||||
Reference in New Issue
Block a user