import http from '@/utils/http';
import { Journal } from '@/types/common';

export async function getFundList(pageIndex: number, pageSize: number): Promise<Journal[]> {
  const {
    ok,
    data,
    msg,
  } = await http.get<Journal[]>('/fund/actions', {
    pageIndex,
    pageSize,
  });
  if (ok && data) {
    return data;
  }
  throw Error(msg);
}
