-
Notifications
You must be signed in to change notification settings - Fork 121
Login: Update root endpoint parsing #16111
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
Login: Update root endpoint parsing #16111
Conversation
|
|
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Works as described. Namespaces arrived as dictionary and were successfully decoded/transformed into an array
| /// This workaround transforms the unexpected dictionary to extract the values in the dictionary. | ||
| let namespaces = siteAPIContainer.failsafeDecodeIfPresent( | ||
| targetType: [String].self, | ||
| forKey: .namespaces, alternativeTypes: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit: I'd put the alternativeTypes: [ on the next line to keep the indentation consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in c7889b0 👍

Closes WOOMOB-1315
Description
As part of the Jetpack site improvements project, we are fetching the root endpoint upon app launch and switching sites. This PR adds a similar change with Android in woocommerce/woocommerce-android#14524 PR to support the altered form of the
namespacefield in the response to avoid blocking the app.Additionally, redundant observers are removed upon changes of authentication.
Testing steps
Testing information
In trunk the above steps will lead to an error, but should succeed in this branch.
Screenshots
N/A
RELEASE-NOTES.txtif necessary.