Merge pull request #107 from sharetribe/update-sdk

Update SDK
This commit is contained in:
Kimmo Puputti 2017-04-06 10:24:44 +03:00 committed by GitHub
commit fda12bb732
4 changed files with 10 additions and 11 deletions

View file

@ -28,7 +28,7 @@
"redux-thunk": "^2.2.0",
"sanitize.css": "^5.0.0",
"sharetribe-scripts": "0.9.2",
"sharetribe-sdk": "git+ssh://git@github.com/sharetribe/sharetribe-sdk-js#940592cf131e3557e225d354736be92ab337c080",
"sharetribe-sdk": "git+ssh://git@github.com/sharetribe/sharetribe-sdk-js#d034401c335b115d41f283698d779d019906a419",
"source-map-support": "^0.4.14",
"url": "^0.11.0"
},

View file

@ -80,7 +80,8 @@ export const fetchCurrentUser = () =>
export const createStripeAccount = (bankAccountToken, country) =>
(dispatch, getState, sdk) => {
dispatch(stripeAccountCreateRequest());
return sdk.users.createStripeAccount({ bankAccountToken, country })
return sdk.users
.createStripeAccount({ bankAccountToken, country })
.then(response => {
dispatch(stripeAccountCreateSuccess(response));
return response;

View file

@ -82,13 +82,11 @@ if (typeof window !== 'undefined') {
}
// Expose stuff for the browser REPL
if (config.dev) {
const actions = bindActionCreators(
{ showListings, queryListings, searchListings, showMarketplace, showUsers },
store.dispatch
);
window.app = { config, sdk, sdkTypes: types, actions, store, sample, routeConfiguration };
}
const actions = bindActionCreators(
{ showListings, queryListings, searchListings, showMarketplace, showUsers },
store.dispatch
);
window.app = { config, sdk, sdkTypes: types, actions, store, sample, routeConfiguration };
}
// Export the function for server side rendering.

View file

@ -5949,9 +5949,9 @@ sharetribe-scripts@0.9.2:
optionalDependencies:
fsevents "1.0.17"
"sharetribe-sdk@git+ssh://git@github.com/sharetribe/sharetribe-sdk-js#940592cf131e3557e225d354736be92ab337c080":
"sharetribe-sdk@git+ssh://git@github.com/sharetribe/sharetribe-sdk-js#d034401c335b115d41f283698d779d019906a419":
version "0.0.1"
resolved "git+ssh://git@github.com/sharetribe/sharetribe-sdk-js#940592cf131e3557e225d354736be92ab337c080"
resolved "git+ssh://git@github.com/sharetribe/sharetribe-sdk-js#d034401c335b115d41f283698d779d019906a419"
dependencies:
axios "^0.15.3"
js-cookie "^2.1.3"