Skip to content

Free & Open-Source Invoice Generator - No Sign-Up, No Ads, Instant PDF Export, 100% In-Browser, and Fully Customizable Templates.

refactor: update Telegram webhook response to include success message in JSON format

VladSez51d0cae128ed
diff --git a/src/app/api/telegram-webhook/route.ts b/src/app/api/telegram-webhook/route.ts
index 82a368d..5ced427 100644
--- a/src/app/api/telegram-webhook/route.ts
+++ b/src/app/api/telegram-webhook/route.ts
@@ -115,14 +115,16 @@ export async function POST(req: NextRequest) {
});
}
- await sendTelegramMessage({
- message: `✅ Invoices generated and sent successfully!`,
- });
-
- return new NextResponse(JSON.stringify({ ok: true }), {
- status: 200,
- headers: { "Content-Type": "application/json" },
- });
+ return new NextResponse(
+ JSON.stringify({
+ ok: true,
+ message: "[telegram-webhook] Invoices generated and sent successfully!",
+ }),
+ {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ },
+ );
} catch (error) {
console.error("[telegram-webhook] Error in webhook:", error);