Skip to content

Commit

Permalink
Add fields to response (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
letsintegreat authored Mar 7, 2023
1 parent 6f828c8 commit 53e85aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions website/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ def retrieve(self, request, pk,*args, **kwargs):

issue = Issue.objects.filter(id=pk).first()
return Response(self.get_issue_info(request,issue))

def create(self, request, *args, **kwargs):
response = super().create(request, *args, **kwargs)
data = response.data
issue = Issue.objects.filter(id=data["id"]).first()
return Response(self.get_issue_info(request,issue))


class LikeIssueApiView(APIView):

Expand Down

0 comments on commit 53e85aa

Please sign in to comment.