14 lines
573 B
TypeScript
14 lines
573 B
TypeScript
import useAxios from "@/utils/useAxios";
|
|||
|
|
import type {PInventory, Product} from "@/models/products";
|
||
|
|
import type { PWallet, Wallet } from '@/models/wallet'
|
||
|
|
|
||
|
|
|
||
|
|
export const getProducts = async (): Promise<any> => {
|
||
|
|
return await useAxios.get<Product[]>(`/customer/product/list`)
|
||
|
|
}
|
||
|
|
export const getProductInventory = async (): Promise<any> => {
|
||
|
|
return await useAxios.post<PInventory[]>(`/customer/wallet/product/table`)
|
||
|
|
}
|
||
|
|
export const getOneProductWallet = async (id: number): Promise<any> => {
|
||
|
|
return await useAxios.get<PWallet>(`/customer/wallet/product/${id}`)
|
||
|
|
}
|