invoice list
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import axios from "@/config/axios";
|
||||
import type { CreatePreInvoiceType } from "../types/Types";
|
||||
import type { CreatePreInvoiceType, GetInvoiceResponseType } from "../types/Types";
|
||||
|
||||
export const createInvoice = async (params: CreatePreInvoiceType) => {
|
||||
const { data } = await axios.post("/admin/invoice", params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const getInvoice = async (page = 1): Promise<GetInvoiceResponseType> => {
|
||||
const { data } = await axios.get<GetInvoiceResponseType>("/admin/invoice", {
|
||||
params: { page },
|
||||
});
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user