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:
parent
3f30819d25
commit
0eb4bc706a
6 changed files with 199 additions and 186 deletions
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue