Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

fix: fixed failed to load all packages after login#73

Merged
juanpicado merged 1 commit intoverdaccio:4.x-masterfrom
coolsp:coolsp-fix-package-load
Jun 10, 2019
Merged

fix: fixed failed to load all packages after login#73
juanpicado merged 1 commit intoverdaccio:4.x-masterfrom
coolsp:coolsp-fix-package-load

Conversation

@coolsp
Copy link
Copy Markdown
Member

@coolsp coolsp commented Jun 9, 2019

fix:

Non-public packages not included in the package-list after login.

Description:

A login forces react to reload the list of available packages (by changing the state).
However the state (which triggers react to refresh) is set before storing the login token resulting in fetching (XHR GET) only the public packages as the token is not yet available in the GET request.

Fixed by setting the storage items ('username' and 'token') before this.setLoggedUser().

Resolves #72

A login forces react to reload the list of available packages (by changing the state).
However the state (which triggers react to refresh) is set before storing the login token resulting in fetching (XHR GET) only the public packages as the token is not yet available in the GET request.

Fixed by setting the storage items ('username' and 'token') before this.setLoggedUser().
@juanpicado juanpicado merged commit 7bac088 into verdaccio:4.x-master Jun 10, 2019
@juanpicado
Copy link
Copy Markdown
Member

Thanks @coolsp , I really liked the detailed description in the commit, awesome 👍

@juanpicado juanpicado added the bug label Jun 10, 2019
@coolsp
Copy link
Copy Markdown
Member Author

coolsp commented Jun 10, 2019

Thanks @DanielRuf @juanpicado for this quick turnaround, great work 🥇 !

@juanpicado
Copy link
Copy Markdown
Member

shipped verdaccio@4.0.2

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.

Failed to load all packages after login

3 participants