From adc6e34fcac277d5013e759bd06d8c2deb6c82ab Mon Sep 17 00:00:00 2001 From: Harun CAN Date: Tue, 31 Mar 2026 13:04:45 +0300 Subject: [PATCH] main --- src/app.module.ts | 2 +- src/i18n/en/common.json | 14 +---- .../render-callback.controller.ts | 63 ++++++++++--------- 3 files changed, 34 insertions(+), 45 deletions(-) diff --git a/src/app.module.ts b/src/app.module.ts index 9b8910a..7d33808 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -117,7 +117,7 @@ import { useFactory: (configService: ConfigService) => ({ fallbackLanguage: configService.get('i18n.fallbackLanguage', 'en'), loaderOptions: { - path: path.join(__dirname, '/i18n/'), + path: path.join(__dirname, '..', 'i18n'), watch: configService.get('app.isDevelopment', true), }, }), diff --git a/src/i18n/en/common.json b/src/i18n/en/common.json index 3325cb0..0967ef4 100644 --- a/src/i18n/en/common.json +++ b/src/i18n/en/common.json @@ -1,13 +1 @@ -{ - "welcome": "Welcome", - "success": "Operation completed successfully", - "created": "Resource created successfully", - "updated": "Resource updated successfully", - "deleted": "Resource deleted successfully", - "restored": "Resource restored successfully", - "notFound": "Resource not found", - "serverError": "An unexpected error occurred", - "unauthorized": "You are not authorized to perform this action", - "forbidden": "Access denied", - "badRequest": "Invalid request" -} +{} diff --git a/src/modules/render-callback/render-callback.controller.ts b/src/modules/render-callback/render-callback.controller.ts index 9eb337f..ac4e204 100644 --- a/src/modules/render-callback/render-callback.controller.ts +++ b/src/modules/render-callback/render-callback.controller.ts @@ -16,6 +16,38 @@ import { NotificationsService } from '../notifications/notifications.service'; import { Public } from '../../common/decorators'; import { ProjectStatus, RenderStage } from '@prisma/client'; +// ── DTO Tanımları ────────────────────────────────────────── + +export class RenderProgressDto { + projectId: string; + renderJobId?: string; + progress: number; + stage: string; + stageLabel: string; + currentScene?: number; + totalScenes?: number; + eta?: number; + stepDurationMs?: number; +} + +export class RenderCompletedDto { + projectId: string; + renderJobId?: string; + finalVideoUrl: string; + thumbnailUrl?: string; + processingTimeMs: number; + fileSize: number; +} + +export class RenderFailedDto { + projectId: string; + renderJobId?: string; + error: string; + stage: string; + attemptNumber: number; + canRetry?: boolean; +} + /** * Render Callback Controller * @@ -285,34 +317,3 @@ export class RenderCallbackController { } } -// ── DTO Tanımları ────────────────────────────────────────── - -class RenderProgressDto { - projectId: string; - renderJobId?: string; - progress: number; - stage: string; - stageLabel: string; - currentScene?: number; - totalScenes?: number; - eta?: number; - stepDurationMs?: number; -} - -class RenderCompletedDto { - projectId: string; - renderJobId?: string; - finalVideoUrl: string; - thumbnailUrl?: string; - processingTimeMs: number; - fileSize: number; -} - -class RenderFailedDto { - projectId: string; - renderJobId?: string; - error: string; - stage: string; - attemptNumber: number; - canRetry?: boolean; -}