15 lines
648 B
TypeScript
15 lines
648 B
TypeScript
import type { AddId } from '@/model/customer'
|
|
import useAxios from '@core/utils/useAxios'
|
|
import type { last, Price } from "@/model/price";
|
|
import type { TableInput } from '@core/type/baseTable'
|
|
import type { MethodePrices } from "@/model/product";
|
|
|
|
export const createPrice = async (obj: Price) => await useAxios.post<AddId>(`/admin/price`, obj)
|
|
|
|
export const getPriceTable = async (params: TableInput) =>
|
|
await useAxios.post<Array<Price>>('/admin/price/table', params)
|
|
|
|
export const getLastPrice = async () => await useAxios.get<last>(`/api/price/last`)
|
|
|
|
export const methodePrices = async () => await useAxios.get<MethodePrices[]>('/admin/p')
|