video-optimizer-bot / worker /src /telegram.ts
Hugging Face Deployer
Deploy bot to Hugging Face Spaces
03b405b
Raw History Blame Contribute Delete
349 Bytes
export function json(data: unknown, status = 200): Response {
return new Response(JSON.stringify(data), {
status,
headers: {
"content-type": "application/json; charset=utf-8",
"cache-control": "no-store"
}
});
}
export function isTelegramWebhookPath(url: URL): boolean {
return url.pathname === "/telegram/webhook";
}