diff options
Diffstat (limited to 'src-migrate/services')
| -rw-r--r-- | src-migrate/services/banner.ts | 11 | ||||
| -rw-r--r-- | src-migrate/services/voucher.ts | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src-migrate/services/banner.ts b/src-migrate/services/banner.ts new file mode 100644 index 00000000..1b46ba06 --- /dev/null +++ b/src-migrate/services/banner.ts @@ -0,0 +1,11 @@ +import odooApi from '~/libs/odooApi'; +import { IBanner } from '~/types/banner'; + +export const getBanner = async ({ + type, +}: { + type: string; +}): Promise<IBanner[]> => { + const searchParams = new URLSearchParams({ type }); + return await odooApi('GET', `/api/v1/banner?${searchParams.toString()}`); +}; diff --git a/src-migrate/services/voucher.ts b/src-migrate/services/voucher.ts new file mode 100644 index 00000000..447b448e --- /dev/null +++ b/src-migrate/services/voucher.ts @@ -0,0 +1,8 @@ +import odooApi from '~/libs/odooApi'; +import { IVoucher } from '~/types/voucher'; + +export const getVoucher = async (): Promise<IVoucher[]> => { + const url = `/api/v1/voucher`; + + return await odooApi('GET', url); +}; |
