Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Return user session data behind flag #1298

Merged
merged 2 commits into from
Mar 26, 2024
Merged

Conversation

lizkenyon
Copy link
Contributor

Related to #1288

WHY are these changes introduced?

Some of the adapters can pass in additional information so we need to add a flag to the fromPropertyArray to keep the same functionality, and remove this as possible breaking change.

WHAT is this pull request doing?

  • Adds an optional boolean flag to return the user session data

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have used yarn changeset to create a draft changelog entry (do NOT update the CHANGELOG.md file manually)
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

Some adapters currently pass in extra info by default

We need a flag so that this is not a breaking change
@lizkenyon lizkenyon requested a review from a team as a code owner March 26, 2024 18:30
@@ -0,0 +1,2 @@
---
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let the changeset empty as this is just in addition to the other PR

key,
(associatedUserObj.associated_user.id = Number(value)),
];
if (returnUserData) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This switch statement got a more complicated with this change. Let me know if you are okay with this, or you would like this refactored into a (possibly) more readable if/else

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's probably fine - this will eventually be removed so it's not the end of the world.

key,
(associatedUserObj.associated_user.id = Number(value)),
];
if (returnUserData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's probably fine - this will eventually be removed so it's not the end of the world.

@lizkenyon lizkenyon merged commit eae4573 into main Mar 26, 2024
10 checks passed
@lizkenyon lizkenyon deleted the liz/from-property-array-flag branch March 26, 2024 21:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants