import axios from "@/config/axios";
import type {
  GetRestaurantResponse,
  UpdateRestaurantType,
} from "../types/Types";

export const getRestaurant = async (): Promise<GetRestaurantResponse> => {
  const { data } = await axios.get<GetRestaurantResponse>(
    "/admin/restaurants/my-restaurant"
  );
  return data;
};

export const updateRestaurant = async (params: UpdateRestaurantType) => {
  const { data } = await axios.patch(
    "/admin/restaurants/my-restaurant",
    params
  );
  return data;
};
