Skip to content

ProductList/AddToCart: Navigate to Login, if not authorized.#3

Open
aynur-safin wants to merge 2 commits intokalintsenkov:masterfrom
aynur-safin:aynur-safin-patch-1
Open

ProductList/AddToCart: Navigate to Login, if not authorized.#3
aynur-safin wants to merge 2 commits intokalintsenkov:masterfrom
aynur-safin:aynur-safin-patch-1

Conversation

@aynur-safin
Copy link
Copy Markdown

An error occurs when trying to add an item to the cart if the user is not logged in.
The error occurs when trying to get JSON from the response:
var errors = await response.Content.ReadFromJsonAsync<string[]>();

@aynur-safin aynur-safin marked this pull request as ready for review October 1, 2020 21:53
Copy link
Copy Markdown

@jareksgit jareksgit left a comment

Choose a reason for hiding this comment

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

Master should be pulled ;-)
Also await this.AuthState.GetAuthenticationStateAsync() could be used to get user auth state.

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