init
This commit is contained in:
30
src/services/recurrentService.ts
Normal file
30
src/services/recurrentService.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
// src/services/recurrentyService.ts
|
||||
import apiClient from '@/plugins/axios';
|
||||
import { RecurrentPayment} from "@/models/Recurrent"; // Импортируете настроенный экземпляр axios
|
||||
|
||||
export const getRecurrentPayments = async () => {
|
||||
console.log('getRecurrentPayments');
|
||||
return await apiClient.get('/recurrents/');
|
||||
};
|
||||
|
||||
|
||||
export const saveRecurrentPayment = async (payment: RecurrentPayment) => {
|
||||
console.log('saveRecurrentPayment');
|
||||
return await apiClient.post('/recurrents/', payment)
|
||||
}
|
||||
//
|
||||
// export const getCategoryTypes = async () => {
|
||||
// return await apiClient.get('/categories/types/');
|
||||
// }
|
||||
//
|
||||
// export const createCategory = async (category: Category) => {
|
||||
// return await apiClient.post('/categories', category);
|
||||
// };
|
||||
//
|
||||
// export const updateCategory = async (id: number, category: any) => {
|
||||
// return await apiClient.put(`/categories/${id}`, category);
|
||||
// };
|
||||
//
|
||||
// export const deleteCategory = async (id: number) => {
|
||||
// return await apiClient.delete(`/categories/${id}`);
|
||||
// };
|
||||
Reference in New Issue
Block a user