This commit is contained in:
client.perkafean.backup
2024-09-05 07:05:20 +00:00
parent 2bc5aa6a14
commit 0dcbe77019
7 changed files with 266 additions and 243 deletions

View File

@@ -343,10 +343,15 @@ export const getFavourite = async (cafeId) => {
return response.json();
};
export const getAnalytics = async (cafeId) => {
export const getAnalytics = async (cafeId, filter) => {
const response = await fetch(
`${API_BASE_URL}/transaction/get-analytics/${cafeId}`,
getHeaders()
API_BASE_URL + "/transaction/get-analytics/" + cafeId + "?type=" + filter,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
}
);
return response.json();
};