import { api } from "@/config/axios";
import { FoodResponse } from "../../types/Types";

export const getFood = async (id: string): Promise<FoodResponse> => {
  const { data } = await api.get<FoodResponse>(`/public/foods/${id}`);
  return data;
};

export const toggleFavorite = async (foodId: string) => {
  const { data } = await api.post(`/public/foods/favorite/${foodId}`);
  return data;
};
