Created
March 11, 2015 08:26
-
-
Save s-panferov/cd4e97d1a76443cc3f61 to your computer and use it in GitHub Desktop.
API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private dispatchLoadOrgs(action: org_actions.LoadOrgs.Start) { | |
loadOrgsLock.lock(action.actionId, api.requestManager); | |
org_api.OrgApi | |
.loadOrgs(action.actionId) | |
.then((reply) => { | |
loadOrgsLock.unlock(); | |
this.dispatcher.dispatch(new org_actions.LoadOrgs.Complete(action, reply.orgs)) | |
}) | |
.catch((e) => { | |
console.error(e); | |
loadOrgsLock.unlock(); | |
this.dispatcher.dispatch(new org_actions.LoadOrgs.Fail(action)) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment