import {SERVICES} from "@/shared/constants/apiEndpoints";
import {GET} from "@/shared/api/apiClient";
import {GetServiceByIdResponse, GetServicesResponse} from "@/shared/types/services";

export const getServices = async (): Promise<GetServicesResponse> => {
  const {data} = await GET<GetServicesResponse>(`${SERVICES}`);
  return data
}

export const getServiceById = async (id: number): Promise<GetServiceByIdResponse> => {
  const {data} = await GET<GetServiceByIdResponse>(`${SERVICES}/${id}`);
  return data
}