Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/review #55

Merged
merged 5 commits into from
Oct 26, 2024
Merged

Feature/review #55

merged 5 commits into from
Oct 26, 2024

Conversation

moonyu012
Copy link
Collaborator

포스트맨 테스트 했습니다!

@@ -6,10 +6,16 @@

class ReviewSerializer(serializers.ModelSerializer):
game_request_id = serializers.IntegerField(source="game_request.id", read_only=True)
author_id = serializers.SerializerMethodField()
author_nickname = serializers.CharField(source="game_request.user.nickname", read_only=True)
maet_nickname = serializers.CharField(source="game_request.mate.nickname", read_only=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

변수에 오타가 있네요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오 감사합니다!


class Meta:
model = Review
fields = ["game_request_id", "rating", "content", "created_at"]
fields = ["game_request_id", "author_id", "author_nickname", "maet_nickname", "rating", "content", "created_at"]
Copy link
Contributor

Choose a reason for hiding this comment

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

여기도 위에 오타난거 수정하시면 됩니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네!

# 추가된 필드 확인 (author_id, author_nickname, maet_nickname)
self.assertEqual(response.data["results"][0]["author_id"], self.user.id)
self.assertEqual(response.data["results"][0]["author_nickname"], "사용자임")
self.assertEqual(response.data["results"][0]["maet_nickname"], "mate임")
Copy link
Contributor

Choose a reason for hiding this comment

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

여기두 수정하셔야 합니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@hwangtate hwangtate merged commit e297e79 into develop Oct 26, 2024
1 check passed
@hwangtate hwangtate deleted the feature/review branch October 26, 2024 02:50
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