summaryrefslogtreecommitdiff
path: root/src-migrate/services/variant.ts
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-01-19 02:32:43 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-01-19 02:32:43 +0000
commit8bcadf6d43a44169c422305522784424c30c7b02 (patch)
tree4666802b65784a949db4acad665a81de7297fc74 /src-migrate/services/variant.ts
parent065396828266e2de42cb0182c81ea2d7a5b00e2b (diff)
parent91086d8b1af2e1c0ca9db38d037f6331c9e6131a (diff)
Merged in Feature/perf/product-detail (pull request #127)
Feature/perf/product detail
Diffstat (limited to 'src-migrate/services/variant.ts')
-rw-r--r--src-migrate/services/variant.ts14
1 files changed, 0 insertions, 14 deletions
diff --git a/src-migrate/services/variant.ts b/src-migrate/services/variant.ts
deleted file mode 100644
index 213187d2..00000000
--- a/src-migrate/services/variant.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { CategoryPromo, IPromotion } from '~/common/types/promotion';
-
-export const getVariantById = async (variantId: number) => {
- const url = `/api/product-variant/${variantId}`;
- return await fetch(url).then((res) => res.json());
-};
-
-export const getVariantPromoByCategory = async (
- variantId: number,
- type: CategoryPromo
-): Promise<{ data: IPromotion[] }> => {
- const url = `/api/product-variant/${variantId}/promotion/${type}`;
- return await fetch(url).then((res) => res.json());
-};