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

Update user profile types #340

Merged
merged 1 commit into from
Oct 20, 2024
Merged

Update user profile types #340

merged 1 commit into from
Oct 20, 2024

Conversation

JElgar
Copy link
Member

@JElgar JElgar commented Oct 20, 2024

Match new type names from now-u/now-u-backend#3

Description

Please include a brief summary of what the issue is and what has been done to solve it

Fixes #<issue_number> or taiga link

Checklist:

Creator

  • The target branch is main
  • I have updated the unreleased section of the change log
  • I have reviewed the 'files changed' tab on github to ensure all changes are as expected
  • I have added someone to review the pr

Reviewer

  • I have verified the above are all completed
  • I have run the code locally to ensure it fufills the requirements of the issue
  • I have reviewed the 'files changed' and commented on any sections which I think are not needed, incorrect or could be improved

After pull

  • If appropriate I have closed the issue/ moved the trello card

Comment on lines +1720 to +1721
- email
- id
Copy link
Member Author

Choose a reason for hiding this comment

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

The only change we actually care about here is the fact name is not here

patchedUserProfileUpdate:
Api.PatchedUserProfileUpdate((profile) => profile..name = name),
);
await fetchUser();
Copy link
Member Author

Choose a reason for hiding this comment

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

This is pretty sad. In an ideal world we would have the same return type for update and get but right now the API doesn't do that. For now Ive just set it so we refetch the user after update but in the future ill work out how to use django

@JElgar JElgar force-pushed the user-profile-types branch from cee2280 to 0a9932e Compare October 20, 2024 16:51
@JElgar JElgar requested a review from kackogut October 20, 2024 17:20
@JElgar JElgar merged commit 8f5d460 into main Oct 20, 2024
2 checks passed
@JElgar JElgar deleted the user-profile-types branch October 20, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants