mirror of
https://github.com/woodchen-ink/certimate.git
synced 2025-07-19 01:41:55 +08:00
23 lines
376 B
TypeScript
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;
|
|
};
|
|
|