import baseApi from "./baseApi";

const categoryApi = baseApi.injectEndpoints({
    endpoints: (builder) => ({
        getAllCategories: builder.query({
            query: () => ({
                url: '/category/all',
                method: 'GET',
            }),
            providesTags: ['categories'],
        }),
    }),
});

export const { useGetAllCategoriesQuery } = categoryApi;
export default categoryApi;
