All files / src/instruments instruments.controller.ts

100% Statements 10/10
100% Branches 0/0
100% Functions 2/2
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 209x 9x 9x   9x           9x 9x       9x 2x      
import { Controller, Get, UseGuards } from '@nestjs/common';
import { InstrumentsService } from './instruments.service';
import { AuthGuard } from '../auth/auth.guard';
import { InstrumentsDto } from './dto/instruments.dto';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
 
@ApiTags('instruments')
@ApiBearerAuth()
@Controller('instruments')
@UseGuards(AuthGuard)
export class InstrumentsController {
  constructor(private readonly instrumentsService: InstrumentsService) {}
 
  @Get('options')
  @ApiOperation({ summary: 'Get available instrument options' })
  async getInstrumentsOptions(): Promise<InstrumentsDto> {
    return await this.instrumentsService.getInstrumentsOptions();
  }
}