22 lines
709 B
TypeScript
22 lines
709 B
TypeScript
import { Controller, Get, UseGuards } from '@nestjs/common';
|
|
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
|
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
|
|
import { TreatmentCatalogService } from './treatment-catalog.service';
|
|
|
|
@ApiTags('treatment-catalog')
|
|
@ApiBearerAuth('JWT-auth')
|
|
@UseGuards(JwtAuthGuard)
|
|
@Controller('treatment-catalog')
|
|
export class TreatmentCatalogController {
|
|
constructor(private readonly treatmentCatalogService: TreatmentCatalogService) {}
|
|
|
|
@Get()
|
|
@ApiOperation({ summary: 'List treatment types from the catalog (data-driven)' })
|
|
list() {
|
|
return {
|
|
success: true,
|
|
data: this.treatmentCatalogService.list(),
|
|
};
|
|
}
|
|
}
|