import { post } from "@/utils/request";

export const getUserInfo = async () => {
  const [err, { memberInfo }] = await post<{ memberInfo: IUser }>(
    "/member/info/getMemberInfo"
  );
  return err ? null : memberInfo;
};
export const getToken = async (login: ILogin) => {
  const [, { token = "" }] = await post("/member/info/memberLogin", login);
  return token as string;
};
