import { Controller, Post, Body, UseGuards } from '@nestjs/common';
import { AuthService } from './auth.service';
import { FirebaseAuthGuard } from './firebase-auth.guard';

@Controller('auth')
export class AuthController {
  constructor(private authService: AuthService) {}

  @Post('login')
  async login(@Body() credentials: { token: string }) {
    return this.authService.validateUser(credentials.token);
  }

  @UseGuards(FirebaseAuthGuard)
  @Post('verify')
  async verifyToken() {
    return { authenticated: true };
  }
}