This commit is contained in:
Joshua T Flowers 2019-02-04 10:50:22 +08:00 committed by GitHub
parent a4f7fcdfe3
commit 2c1f8c17c7
1 changed files with 5 additions and 5 deletions

View File

@ -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,