Skip to content

7th Assignment Submission#74

Open
Joeyoojin wants to merge 1 commit into
snulion11th-seminar:uzinfrom
Joeyoojin:uzin
Open

7th Assignment Submission#74
Joeyoojin wants to merge 1 commit into
snulion11th-seminar:uzinfrom
Joeyoojin:uzin

Conversation

@Joeyoojin

Copy link
Copy Markdown

No description provided.

@Joeyoojin Joeyoojin requested review from syrius527 and young924 May 7, 2023 02:44
Comment thread comment/views.py
return Response({"detail": "Authentication credentials not provided"}, status=status.HTTP_401_UNAUTHORIZED)

try:
comment = Comment.objects.get(id=comment_id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굳굳 comment_id를 이미 path parameter에서 받아왔기 때문에(55line) comment_id를 다시 불러올 필요 없이 쓰면 됩니다!

Comment thread comment/views.py
return Response({"detail": "missing fields ['content']"}, status=status.HTTP_400_BAD_REQUEST)

serializer = CommentSerializer(comment, data=request.data, partial=True)
if not serializer.is_valid():

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유효성검사 👍

@syrius527 syrius527 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~~
다음에도 꼭 복습해보기!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants