fix: Add JWT auth guard to photos controller
Some checks failed
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled

The photos upload endpoint was missing authentication, causing 500 errors.
Added @UseGuards(JwtAuthGuard) to protect all photo endpoints and ensure
req.user is populated for photo operations.

Fixes photo upload authentication issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-04 08:25:25 +00:00
parent 0e13401148
commit d22b0d56a5

View File

@@ -11,12 +11,15 @@ import {
UseInterceptors,
UploadedFile,
BadRequestException,
UseGuards,
} from '@nestjs/common';
import { FileInterceptor } from '@nestjs/platform-express';
import { PhotosService } from './photos.service';
import { PhotoType } from '../../database/entities/photo.entity';
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
@Controller('api/v1/photos')
@UseGuards(JwtAuthGuard)
export class PhotosController {
constructor(private readonly photosService: PhotosService) {}