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

Fix fetch user return promise #4695

Merged
merged 1 commit into from
Apr 4, 2017
Merged

Fix fetch user return promise #4695

merged 1 commit into from
Apr 4, 2017

Conversation

ashumilova
Copy link
Contributor

Signed-off-by: Ann Shumilova ashumilova@codenvy.com

What does this PR do?

Reworks fetch current user to return promise and handle 304.

Changelog

[UD] reworked fetch current user to return promise on error and handle 304 status properly.

Release Notes

N/A

Docs PR

N/A

@ashumilova ashumilova added the kind/enhancement A feature request - must adhere to the feature request template. label Apr 4, 2017
@ashumilova ashumilova self-assigned this Apr 4, 2017
@ashumilova ashumilova requested review from benoitf and akurinnoy April 4, 2017 09:13
@@ -373,11 +373,15 @@ export class CheUser {
fetchUser(): ng.IPromise<any> {
let promise = this.remoteUserAPI.get().$promise;
// check if if was OK or not
promise.then((user: che.IUser) => {
return promise.then((user: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

user is no longer of che.IUser type ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, my mistake - fixed

Signed-off-by: Ann Shumilova <ashumilova@codenvy.com>
@ashumilova ashumilova modified the milestones: 5.7.0, 5.8.0 Apr 4, 2017
@ashumilova ashumilova merged commit 5d93bb1 into master Apr 4, 2017
@ashumilova ashumilova deleted the fix_fetch_user branch April 4, 2017 11:46
@codenvy-ci
Copy link

@JamesDrummond JamesDrummond mentioned this pull request Apr 9, 2017
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants