feat: Improvements to the products details page in the admin (#6994)

This commit is contained in:
Stevche Radevski
2024-04-07 17:52:47 +02:00
committed by GitHub
parent a24d6e6c97
commit f65fbff535
15 changed files with 507 additions and 7 deletions
@@ -36,6 +36,10 @@ async function listVariants(productId: string, query?: Record<string, any>) {
return getRequest<any>(`/admin/products/${productId}/variants`, query)
}
async function createVariant(productId: string, payload: any) {
return postRequest<any>(`/admin/products/${productId}/variants`, payload)
}
async function updateVariant(
productId: string,
variantId: string,
@@ -76,6 +80,7 @@ export const products = {
delete: deleteProduct,
retrieveVariant,
listVariants,
createVariant,
updateVariant,
deleteVariant,
createOption,