import axios from "../../../config/axios";

export const getLearnings = async (search: string, limit?: number) => {
  const { data } = await axios.get(
    `/learnings?q=${search}&limit=${limit ? limit : 20}`
  );
  return data;
};

export const getLearningDetail = async (id: string) => {
  const { data } = await axios.get(`/learnings/${id}`);
  return data;
};
