try to do better
This commit is contained in:
@@ -26,6 +26,7 @@ import type {
|
||||
JoinFamilyResponse,
|
||||
FamilyMember,
|
||||
LeaveFamilyResponse,
|
||||
ExpenseHistoryResponse,
|
||||
} from '../types';
|
||||
|
||||
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || '';
|
||||
@@ -120,6 +121,11 @@ export const expenseApi = {
|
||||
|
||||
getRemainingLimit: (familyId: number, categoryId: number) =>
|
||||
apiClient.get<RemainingLimit>(`/families/${familyId}/categories/${categoryId}/remaining`),
|
||||
|
||||
getHistory: (familyId: number, categoryId: number, showArchive: boolean = false, sortOrder: string = 'desc') =>
|
||||
apiClient.get<ExpenseHistoryResponse>(`/families/${familyId}/categories/${categoryId}/expenses/history`, {
|
||||
params: { show_archive: showArchive, sort_order: sortOrder },
|
||||
}),
|
||||
};
|
||||
|
||||
export const shoppingItemApi = {
|
||||
|
||||
Reference in New Issue
Block a user