import {BRANDS, PRODUCTS} from "@/shared/constants/apiEndpoints";
import {GET} from "@/shared/api/apiClient";
import { BrandProductsType, Brands } from "../types/brands";

export const getBrands = async (): Promise<Brands> => {
  const res = await GET<Brands>(BRANDS);
  return res.data;
}

export const getBrandProducts = async (brandId: number): Promise<BrandProductsType> => {
  const res = await GET<BrandProductsType>(`${brandId}${PRODUCTS}`);
  return res.data;
}