generated from fahricansecer/boilerplate-be
@@ -150,4 +150,38 @@ export class ProjectsController {
|
||||
this.logger.log(`Tweet'ten proje oluşturuluyor: ${dto.tweetUrl}`);
|
||||
return this.projectsService.createFromTweet(userId, dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tekil sahne güncelleme (narrasyon, görsel prompt, süre).
|
||||
*/
|
||||
@Patch(':id/scenes/:sceneId')
|
||||
@ApiOperation({ summary: 'Sahneyi güncelle' })
|
||||
@ApiResponse({ status: 200, description: 'Sahne güncellendi' })
|
||||
async updateScene(
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
@Param('sceneId', ParseUUIDPipe) sceneId: string,
|
||||
@Body() body: { narrationText?: string; visualPrompt?: string; subtitleText?: string; duration?: number },
|
||||
@Req() req: any,
|
||||
) {
|
||||
const userId = req.user?.id || req.user?.sub;
|
||||
this.logger.log(`Sahne güncelleniyor: ${sceneId} (proje: ${id})`);
|
||||
return this.projectsService.updateScene(userId, id, sceneId, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tekil sahneyi AI ile yeniden üretir.
|
||||
*/
|
||||
@Post(':id/scenes/:sceneId/regenerate')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@ApiOperation({ summary: 'Sahneyi AI ile yeniden üret' })
|
||||
@ApiResponse({ status: 200, description: 'Sahne yeniden üretildi' })
|
||||
async regenerateScene(
|
||||
@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 yeniden üretiliyor: ${sceneId} (proje: ${id})`);
|
||||
return this.projectsService.regenerateScene(userId, id, sceneId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user