import { Controller, Get, Request, UseGuards } from '@nestjs/common';
import { AppService } from './app.service';

import { AuthGuard } from './jwt-auth/auth.guard';

@Controller()
export class AppController {
  constructor(
    private readonly appService: AppService,
  ) {}

  @UseGuards(AuthGuard)
  @Get()
  getHello(@Request() req): string {
    return req.user;
  }
}
