Skip to content

Yejin week7 assignment#65

Open
yeahllow wants to merge 3 commits into
snulion11th-seminar:mainfrom
yeahllow:yejin
Open

Yejin week7 assignment#65
yeahllow wants to merge 3 commits into
snulion11th-seminar:mainfrom
yeahllow:yejin

Conversation

@yeahllow

@yeahllow yeahllow commented May 4, 2023

Copy link
Copy Markdown

No description provided.

@yeahllow yeahllow requested a review from young924 May 4, 2023 07:36

@pyungjae9492 pyungjae9492 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, put 메소드만 손봐봅시다

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

if not Post.objects.filter(id=post).exists():

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

exists 함수 사용 좋습니다

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 thread comment/views.py
if request.user != comment.author:
return Response({"detail":"Permission denied"}, status=status.HTTP_401_UNAUTHORIZED)

serializer= CommentSerializer(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.

세이브 하는 로직이 빠져서 수정해도 수정한 것 저장이 디비에는 안되어있을 것 같은데, 한 번 확인해보세요!

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.

3 participants