fix: Add JWT auth guard to photos controller
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:
@@ -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) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user