diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2024-01-13 10:35:22 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2024-01-13 10:35:22 +0700 |
| commit | f62b2345f463695ef0f8f79830cd76b6e0332821 (patch) | |
| tree | c06ff12a8312e3a02b0203f588db0f4da044c911 /src-migrate/services/variant.ts | |
| parent | ee0b5893ac039ab05fe8247647364a923d707da3 (diff) | |
Refactor src migrate folder
Diffstat (limited to 'src-migrate/services/variant.ts')
| -rw-r--r-- | src-migrate/services/variant.ts | 14 |
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()); -}; |
