Fix API namespace for the WooCommerce.com Connect Task (https://github.com/woocommerce/woocommerce-admin/pull/2979)

This commit is contained in:
Justin Shreve 2019-10-01 11:09:13 -04:00 committed by GitHub
parent db4328acb8
commit c5034567fc
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ import { getHistory, getNewPath } from '@woocommerce/navigation';
/** /**
* Internal depdencies * Internal depdencies
*/ */
import { NAMESPACE } from 'wc-api/constants'; import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
import withSelect from 'wc-api/with-select'; import withSelect from 'wc-api/with-select';
class Connect extends Component { class Connect extends Component {
@ -67,7 +67,7 @@ class Connect extends Component {
async request() { async request() {
try { try {
const connectResponse = await apiFetch( { const connectResponse = await apiFetch( {
path: `${ NAMESPACE }/onboarding/plugins/request-wccom-connect`, path: `${ WC_ADMIN_NAMESPACE }/onboarding/plugins/request-wccom-connect`,
method: 'POST', method: 'POST',
} ); } );
if ( connectResponse && connectResponse.connectAction ) { if ( connectResponse && connectResponse.connectAction ) {
@ -84,7 +84,7 @@ class Connect extends Component {
const { query } = this.props; const { query } = this.props;
try { try {
const connectResponse = await apiFetch( { const connectResponse = await apiFetch( {
path: `${ NAMESPACE }/onboarding/plugins/finish-wccom-connect`, path: `${ WC_ADMIN_NAMESPACE }/onboarding/plugins/finish-wccom-connect`,
method: 'POST', method: 'POST',
data: { data: {
request_token: query.request_token, request_token: query.request_token,