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);
  }
}
