Files
nest/integration/scopes/src/transient/test.controller.ts
2018-12-24 14:45:32 +01:00

21 lines
461 B
TypeScript

import {
Controller,
Get,
Param,
UseGuards,
UseInterceptors,
} from '@nestjs/common';
import { Guard } from './guards/request-scoped.guard';
import { Interceptor } from './interceptors/logging.interceptor';
import { UserByIdPipe } from './users/user-by-id.pipe';
@Controller('test')
export class TestController {
@UseGuards(Guard)
@UseInterceptors(Interceptor)
@Get()
greeting(@Param('id', UserByIdPipe) id): string {
return 'hey';
}
}