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