gohorsejobs/backoffice/src/plans/plans.controller.ts
2025-12-15 10:40:55 -03:00

21 lines
572 B
TypeScript

import { Controller, Get, Param } from '@nestjs/common';
import { ApiTags, ApiOperation } from '@nestjs/swagger';
import { PlansService } from './plans.service';
@ApiTags('Plans')
@Controller('plans')
export class PlansController {
constructor(private readonly plansService: PlansService) {}
@Get()
@ApiOperation({ summary: 'Get all plans' })
getAllPlans() {
return this.plansService.getAllPlans();
}
@Get(':id')
@ApiOperation({ summary: 'Get plan by ID' })
getPlanById(@Param('id') id: string) {
return this.plansService.getPlanById(id);
}
}