main
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled

This commit is contained in:
Harun CAN
2026-04-05 20:37:15 +03:00
parent 9f17ced37d
commit 9486f86cca
22 changed files with 2175 additions and 29 deletions
@@ -184,4 +184,40 @@ export class ProjectsController {
this.logger.log(`Sahne yeniden üretiliyor: ${sceneId} (proje: ${id})`);
return this.projectsService.regenerateScene(userId, id, sceneId);
}
/**
* Sahne için ID bazında görsel üret (Gemini AI).
* Kullanıcı custom prompt sağlarsa, önce prompt güncellenir ardından resim üretilir.
*/
@Post(':id/scenes/:sceneId/generate-image')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'Sahne görselini üret' })
@ApiResponse({ status: 200, description: 'Görsel üretildi' })
async generateSceneImage(
@Param('id', ParseUUIDPipe) id: string,
@Param('sceneId', ParseUUIDPipe) sceneId: string,
@Body() body: { customPrompt?: string },
@Req() req: any,
) {
const userId = req.user?.id || req.user?.sub;
this.logger.log(`Sahne görseli üretiliyor: ${sceneId} (proje: ${id})`);
return this.projectsService.generateSceneImage(userId, id, sceneId, body?.customPrompt);
}
/**
* Sahne görselini 4K olarak yeniden boyutlandırır (Upscale)
*/
@Post(':id/scenes/:sceneId/upscale-image')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'Sahne görselini upscale (4K) yap' })
@ApiResponse({ status: 200, description: 'Görsel başarıyla upscale edildi' })
async upscaleSceneImage(
@Param('id', ParseUUIDPipe) id: string,
@Param('sceneId', ParseUUIDPipe) sceneId: string,
@Req() req: any,
) {
const userId = req.user?.id || req.user?.sub;
this.logger.log(`Sahne görseli upscale ediliyor: ${sceneId} (proje: ${id})`);
return this.projectsService.upscaleSceneImage(userId, id, sceneId);
}
}