certimate/ui/src/api/notify.ts
2024-10-19 18:12:45 +08:00

23 lines
376 B
TypeScript

import { getPb } from "@/repository/api";
export const notifyTest = async (channel: string) => {
const pb = getPb();
const resp = await pb.send("/api/notify/test", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: {
channel,
},
});
if (resp.code != 0) {
throw new Error(resp.msg);
}
return resp;
};