All files / src/modules/filters filters.controller.ts

100% Statements 15/15
75% Branches 6/8
100% Functions 5/5
100% Lines 13/13

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 20 21 22 23 24 25 26 27 2812x 12x 12x     12x 12x     12x 1x       12x 1x       12x 1x       12x 1x    
import { Controller, Get, Param } from '@nestjs/common';
import { FiltersService } from '@app/modules/filters/filters.service';
import { ListingType } from '@prisma/client';
 
@Controller('filters')
export class FiltersController {
  constructor(private readonly filtersService: FiltersService) {}
 
  @Get('types')
  getListingTypes() {
    return this.filtersService.getListingTypes();
  }
 
  @Get('schema/:type')
  getFilterSchema(@Param('type') type: ListingType) {
    return this.filtersService.getFilterSchemaForType(type);
  }
 
  @Get('dynamic-values')
  getDynamicValues() {
    return this.filtersService.getDynamicValues();
  }
 
  @Get('static-options')
  getStaticOptions() {
    return this.filtersService.getStaticOptions();
  }
}