certimate/ui/src/api/statistics.ts
2024-11-22 10:59:57 +08:00

16 lines
262 B
TypeScript

import { getPb } from "@/repository/api";
export const get = async () => {
const pb = getPb();
const resp = await pb.send("/api/statistics/get", {
method: "GET",
});
if (resp.code != 0) {
throw new Error(resp.msg);
}
return resp.data;
};