import axios from "axios";
import { ApiServerBaseUrl } from "./baseurl.utils";

export async function getSocialAuthStatus(userId: string) {
  try {
    const res = await axios.get(`${ApiServerBaseUrl}/social/auth/status`, {
      params: { userId },
      withCredentials: true,
    });

    return res.data; // { connected: boolean, userId: string }
  } catch (error: any) {
    return { connected: false };
  }
}
