Fix incorrect label async request paths (https://github.com/woocommerce/woocommerce-admin/pull/1447)
This commit is contained in:
parent
a4f7fcdfe3
commit
2c1f8c17c7
|
@ -39,30 +39,30 @@ export function getRequestByIdString( path, handleData = identity ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getCategoryLabels = getRequestByIdString(
|
export const getCategoryLabels = getRequestByIdString(
|
||||||
NAMESPACE + 'products/categories',
|
NAMESPACE + '/products/categories',
|
||||||
category => ( {
|
category => ( {
|
||||||
id: category.id,
|
id: category.id,
|
||||||
label: category.name,
|
label: category.name,
|
||||||
} )
|
} )
|
||||||
);
|
);
|
||||||
|
|
||||||
export const getCouponLabels = getRequestByIdString( NAMESPACE + 'coupons', coupon => ( {
|
export const getCouponLabels = getRequestByIdString( NAMESPACE + '/coupons', coupon => ( {
|
||||||
id: coupon.id,
|
id: coupon.id,
|
||||||
label: coupon.code,
|
label: coupon.code,
|
||||||
} ) );
|
} ) );
|
||||||
|
|
||||||
export const getCustomerLabels = getRequestByIdString( NAMESPACE + 'customers', customer => ( {
|
export const getCustomerLabels = getRequestByIdString( NAMESPACE + '/customers', customer => ( {
|
||||||
id: customer.id,
|
id: customer.id,
|
||||||
label: customer.username,
|
label: customer.username,
|
||||||
} ) );
|
} ) );
|
||||||
|
|
||||||
export const getProductLabels = getRequestByIdString( NAMESPACE + 'products', product => ( {
|
export const getProductLabels = getRequestByIdString( NAMESPACE + '/products', product => ( {
|
||||||
id: product.id,
|
id: product.id,
|
||||||
label: product.name,
|
label: product.name,
|
||||||
} ) );
|
} ) );
|
||||||
|
|
||||||
export const getVariationLabels = getRequestByIdString(
|
export const getVariationLabels = getRequestByIdString(
|
||||||
query => NAMESPACE + `products/${ query.products }/variations`,
|
query => NAMESPACE + `/products/${ query.products }/variations`,
|
||||||
variation => {
|
variation => {
|
||||||
return {
|
return {
|
||||||
id: variation.id,
|
id: variation.id,
|
||||||
|
|
Loading…
Reference in New Issue