1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 22:39:36 +02:00

feat: enhance adventure handling with user ID support in serializers and attachment view; refactor saveEdit function and clean up Avatar component

This commit is contained in:
Sean Morley 2025-01-22 08:36:02 -05:00
parent 3f30819d25
commit 0eb4bc706a
6 changed files with 199 additions and 186 deletions

View file

@ -34,4 +34,7 @@ class AttachmentViewSet(viewsets.ModelViewSet):
else:
return Response({"error": "User does not own this adventure"}, status=status.HTTP_403_FORBIDDEN)
return super().create(request, *args, **kwargs)
return super().create(request, *args, **kwargs)
def perform_create(self, serializer):
serializer.save(user_id=self.request.user)