Skip to content

Commit

Permalink
Purchases: Use /sites/:site_slug/purchases endpoint in `UpgradesAct…
Browse files Browse the repository at this point in the history
…ions`
  • Loading branch information
drewblaisdell authored and scruffian committed Dec 1, 2015
1 parent a588651 commit 0951f26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/lib/upgrades/actions/purchases.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function fetchSitePurchases( siteId ) {
siteId
} );

wpcom.siteUpgrades( siteId, ( error, data ) => {
wpcom.sitePurchases( siteId, ( error, data ) => {
debug( error, data );

if ( error ) {
Expand All @@ -100,7 +100,7 @@ function fetchSitePurchases( siteId ) {
Dispatcher.handleServerAction( {
type: ActionTypes.PURCHASES_SITE_FETCH_COMPLETED,
siteId,
purchases: purchasesAssembler.createPurchasesArray( data.upgrades )
purchases: purchasesAssembler.createPurchasesArray( data )
} );
}
} );
Expand Down
6 changes: 3 additions & 3 deletions shared/lib/wpcom-undocumented/lib/undocumented.js
Original file line number Diff line number Diff line change
Expand Up @@ -1643,9 +1643,9 @@ Undocumented.prototype.changeTheme = function( siteSlug, data, fn ) {
}, fn );
};

Undocumented.prototype.siteUpgrades = function( siteId, fn ) {
debug( '/site/:site_id/upgrades' );
this.wpcom.req.get( { path: '/sites/' + siteId + '/upgrades' }, fn );
Undocumented.prototype.sitePurchases = function( siteId, fn ) {
debug( '/site/:site_id/purchases' );
this.wpcom.req.get( { path: '/sites/' + siteId + '/purchases' }, fn );
};

Undocumented.prototype.googleAppsListAll = function( domainName, fn ) {
Expand Down

0 comments on commit 0951f26

Please sign in to comment.