+analytics update

This commit is contained in:
Vladimir Voronin
2025-01-24 15:25:43 +03:00
parent a685c67395
commit 26dd9c5202
3 changed files with 81 additions and 32 deletions

View File

@@ -4,8 +4,14 @@ import {Category} from "@/models/Category"; // Импортируете нас
export const getCategories = async (type = null) => {
type = type ? type : ''
return await apiClient.get('/categories?type=' + type);
const params = {};
if (type) {
params.type = type;
}
return await apiClient.get('/categories', {
params: params
});
};
export const getCategoryTypes = async () => {