/
githubmirror
/
nest
Обзор
Документация
Войти
/
githubmirror
/
nest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
integration/inspector/src/circular-hello/hello.controller.ts
30 строк
765 B
Kamil Myśliwiec
test: add inspector e2e tests, add deterministic uuid registry
29 ноя 2022, 11:56
Не верифицирован
29 ноя 2022, 11:56
95e8394
Код
Авторство
О чём код?
import { Controller, Get, Param, UseGuards, UseInterceptors, } from '@nestjs/common'; import { Guard } from './guards/request-scoped.guard'; import { HelloService } from './hello.service'; import { Interceptor } from './interceptors/logging.interceptor'; import { UserByIdPipe } from './users/user-by-id.pipe'; import { UsersService } from './users/users.service'; @Controller('hello') export class HelloController { static COUNTER = 0; constructor( private readonly helloService: HelloService, private readonly usersService: UsersService, ) { HelloController.COUNTER++; } @UseGuards(Guard) @UseInterceptors(Interceptor) @Get() greeting(@Param('id', UserByIdPipe) id): string { return this.helloService.greeting(); } }