All checks were successful
Test Asgard Runner / test (push) Successful in 3s
Real @Public() NestJS endpoint persisting to the existing early_access_signups table (email + server_count), matching the schema exactly (no migration). Duplicate-email safe (pre-check + unique-constraint catch -> friendly success). Wired into app.module. Makes the marketing early-access form functional end-to-end on next API deploy. tsc/nest build green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
717 B
TypeScript
20 lines
717 B
TypeScript
import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
|
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
|
import { Public } from '../../common/decorators/public.decorator';
|
|
import { EarlyAccessService } from './early-access.service';
|
|
import { CreateEarlyAccessDto } from './dto/create-early-access.dto';
|
|
|
|
@ApiTags('early-access')
|
|
@Controller()
|
|
export class EarlyAccessController {
|
|
constructor(private readonly earlyAccessService: EarlyAccessService) {}
|
|
|
|
@Public()
|
|
@Post('early-access')
|
|
@HttpCode(HttpStatus.OK)
|
|
@ApiOperation({ summary: 'Register for early access' })
|
|
async register(@Body() dto: CreateEarlyAccessDto) {
|
|
return this.earlyAccessService.register(dto);
|
|
}
|
|
}
|