feat: verschlüsselte Integrationseinstellungen, Haushaltsmitglieder mit Ersteller, Backup-Download
This commit is contained in:
1 parent
a1195223e0
commit
267f4fcf70
21 files changed
+724
-30
No files matched your search
+5
-3
@@ -1,7 +1,9 @@
|
||||
import { getTelegramSettings } from "./integration-settings";
|
||||
|
||||
export async function sendTelegram(chatId: string, text: string): Promise<void> {
|
||||
const token = process.env.TELEGRAM_BOT_TOKEN;
|
||||
if (!token) throw new Error("TELEGRAM_BOT_TOKEN fehlt");
|
||||
const res = await fetch(`https://api.telegram.org/bot${token}/sendMessage`, {
|
||||
const { botToken } = await getTelegramSettings();
|
||||
if (!botToken) throw new Error("TELEGRAM_BOT_TOKEN fehlt");
|
||||
const res = await fetch(`https://api.telegram.org/bot${botToken}/sendMessage`, {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ chat_id: chatId, text }),
|
||||
|
||||
Reference in new issue
Block a user