import { http } from "@/shared/api/httpClient";
import { API_ROUTES } from "@/shared/constants/api-routes";

import { IMeResponse, MeResponseSchema } from "./types";

export const getMe = async (): Promise<IMeResponse> => {
  return http.get<IMeResponse>(API_ROUTES.usersMe(), {
    tags: ["user", "me"],
    schema: MeResponseSchema,
    revalidate: 0,
  });
};
