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(
|
||||
NAMESPACE + 'products/categories',
|
||||
NAMESPACE + '/products/categories',
|
||||
category => ( {
|
||||
id: category.id,
|
||||
label: category.name,
|
||||
} )
|
||||
);
|
||||
|
||||
export const getCouponLabels = getRequestByIdString( NAMESPACE + 'coupons', coupon => ( {
|
||||
export const getCouponLabels = getRequestByIdString( NAMESPACE + '/coupons', coupon => ( {
|
||||
id: coupon.id,
|
||||
label: coupon.code,
|
||||
} ) );
|
||||
|
||||
export const getCustomerLabels = getRequestByIdString( NAMESPACE + 'customers', customer => ( {
|
||||
export const getCustomerLabels = getRequestByIdString( NAMESPACE + '/customers', customer => ( {
|
||||
id: customer.id,
|
||||
label: customer.username,
|
||||
} ) );
|
||||
|
||||
export const getProductLabels = getRequestByIdString( NAMESPACE + 'products', product => ( {
|
||||
export const getProductLabels = getRequestByIdString( NAMESPACE + '/products', product => ( {
|
||||
id: product.id,
|
||||
label: product.name,
|
||||
} ) );
|
||||
|
||||
export const getVariationLabels = getRequestByIdString(
|
||||
query => NAMESPACE + `products/${ query.products }/variations`,
|
||||
query => NAMESPACE + `/products/${ query.products }/variations`,
|
||||
variation => {
|
||||
return {
|
||||
id: variation.id,
|
||||
|
|
Loading…
Reference in New Issue