MCPcopy Create free account
hub / github.com/MonoYan/open-medkit / verifyWebhook

Function verifyWebhook

backend/src/services/feishu.ts:49–64  ·  view source on GitHub ↗
(
  webhookUrl: string,
  secret?: string,
)

Source from the content-addressed store, hash-verified

47}
48
49export async function verifyWebhook(
50 webhookUrl: string,
51 secret?: string,
52): Promise<{ ok: true }> {
53 if (!isValidWebhookUrl(webhookUrl)) {
54 throw new Error('Invalid Feishu webhook URL format');
55 }
56
57 await postWebhook(webhookUrl, {
58 msg_type: 'text',
59 content: { text: 'MedKit 连通性测试 ✓' },
60 ...buildSignFields(secret),
61 });
62
63 return { ok: true };
64}
65
66export async function sendWebhook(
67 webhookUrl: string,

Callers

nothing calls this directly

Calls 3

postWebhookFunction · 0.85
buildSignFieldsFunction · 0.85
isValidWebhookUrlFunction · 0.70

Tested by

no test coverage detected