import { Get , Controller , UseGuards } from '@nestjs/common' ; import { AuthGuard } from '@nestjs/passport' ; import { ApiBearerAuth } from '@nestjs/swagger' ; import { AppService } from './app.service' ; @ ApiBearerAuth ( ) @ Controller ( ) export class AppController { constructor ( private readonly appService ) { } @ Get ( ) @ UseGuards ( AuthGuard ( ) ) root ( ) { return this . appService . root ( ) ; } }