mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 18:01:23 +02:00
Migrate figgos from single Expo app to multi-app monorepo structure: - Move mobile app to apps/mobile/ - Add apps/web/ (SvelteKit) and apps/backend/ (NestJS) scaffolds - Add packages/shared/ for shared types and constants - Update root package.json with new dev commands - Temporarily skip type-check (run pnpm install first) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
820 B
TypeScript
20 lines
820 B
TypeScript
import { Controller, Post, Body, UseGuards } from '@nestjs/common';
|
|
import { GenerationService } from './generation.service';
|
|
import { GenerateFigureDto } from './dto/generate-figure.dto';
|
|
import { JwtAuthGuard } from '../common/guards/jwt-auth.guard';
|
|
import { CurrentUser, CurrentUserPayload } from '../common/decorators/current-user.decorator';
|
|
|
|
@Controller('generate')
|
|
export class GenerationController {
|
|
constructor(private readonly generationService: GenerationService) {}
|
|
|
|
/**
|
|
* Generate a new figure using AI (auth required)
|
|
* This endpoint uses OpenAI to generate character info and image
|
|
*/
|
|
@Post('figure')
|
|
@UseGuards(JwtAuthGuard)
|
|
async generateFigure(@Body() dto: GenerateFigureDto, @CurrentUser() user: CurrentUserPayload) {
|
|
return this.generationService.generateFigure(dto, user.userId);
|
|
}
|
|
}
|