18 lines
543 B
TypeScript
18 lines
543 B
TypeScript
import axios from "../../../config/axios";
|
|
import { CreateBillType, CreateBillChargeType } from "../types/Types";
|
|
|
|
export const createBill = async (params: CreateBillType) => {
|
|
const { data } = await axios.post("/bills/water", params);
|
|
return data;
|
|
};
|
|
|
|
export const createChargeBill = async (params: CreateBillChargeType) => {
|
|
const { data } = await axios.post("/bills/charge", params);
|
|
return data;
|
|
};
|
|
|
|
export const getBills = async (page: number = 1) => {
|
|
const { data } = await axios.get(`/bills?page=${page}`);
|
|
return data;
|
|
};
|