import { Controller, Get, UseGuards } from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';

import { SessionGuard } from '../auth/guards/session.guard';

import { PlansService } from './plans.service';

@ApiTags('plans')
@Controller('plans')
@UseGuards(SessionGuard)
export class PlansController {
  constructor(private readonly plansService: PlansService) {}

  @Get()
  @ApiOperation({ summary: 'List active server plans' })
  list() {
    return this.plansService.listActivePlans();
  }
}
