Files
dzone-admin/src/pages/bill/service/Service.ts
T
hamid zarghami a939d3bb4c bills
2026-02-17 11:12:25 +03:30

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;
};