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

feat: /user/profile endpoint #458

Closed
wants to merge 2 commits into from

Conversation

fkulla
Copy link
Contributor

@fkulla fkulla commented Apr 26, 2023

Issue: #457

  • Start reading documentation about Django and the Django REST Framework
  • Implement /api/user/profile
  • Write documentation

@fkulla fkulla changed the title [Draft] feat: Implement UserProfile serializer and add API endpoint per #457 [Draft] feat: Implement UserProfile serializer Apr 26, 2023
@fkulla fkulla changed the title [Draft] feat: Implement UserProfile serializer [Draft] feat: /user/profile endpoint Apr 26, 2023
@fkulla fkulla changed the title [Draft] feat: /user/profile endpoint feat: /user/profile endpoint Apr 26, 2023
@fkulla fkulla force-pushed the feat-user-profile-endpoint branch from 6537898 to e7deb44 Compare April 26, 2023 13:29

User preferences.

```json
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
```json
Example response:
```json

return {'user': self.request.user}

@action(methods=['get'], detail=False)
def profile(self, request):
Copy link
Owner

Choose a reason for hiding this comment

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

Please add a basic test to test_bookmarks_api.py

Maybe set some profile properties to non-default values, get profile, verify values are correct.

Comment on lines +98 to +99
def get_serializer_context(self):
return {'user': self.request.user}
Copy link
Owner

Choose a reason for hiding this comment

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

This is not necessary.

@sissbruecker
Copy link
Owner

Closing in favor of #541

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