fix: credentials: include bei allen Telegram API-Requests
This commit is contained in:
1 parent
4ac042e512
commit
e5d76bb0a9
1 file changed
+4
-2
+4
-2
@@ -264,6 +264,7 @@ async function apiTelegramStatus() {
|
||||
async function apiTelegramLink(sessionId) {
|
||||
const resp = await fetch('/api/telegram/link', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ sessionId })
|
||||
});
|
||||
@@ -275,7 +276,7 @@ async function apiTelegramLink(sessionId) {
|
||||
}
|
||||
|
||||
async function apiTelegramWebhookInfo() {
|
||||
const resp = await fetch('/api/telegram/webhook-info');
|
||||
const resp = await fetch('/api/telegram/webhook-info', { credentials: 'include' });
|
||||
if (!resp.ok) throw new Error('Webhook-Info fehlgeschlagen');
|
||||
return resp.json();
|
||||
}
|
||||
@@ -283,6 +284,7 @@ async function apiTelegramWebhookInfo() {
|
||||
async function apiTelegramRegisterWebhook(baseUrl) {
|
||||
const resp = await fetch('/api/telegram/register-webhook', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ baseUrl })
|
||||
});
|
||||
@@ -291,7 +293,7 @@ async function apiTelegramRegisterWebhook(baseUrl) {
|
||||
}
|
||||
|
||||
async function apiTelegramDeleteWebhook() {
|
||||
const resp = await fetch('/api/telegram/webhook', { method: 'DELETE' });
|
||||
const resp = await fetch('/api/telegram/webhook', { method: 'DELETE', credentials: 'include' });
|
||||
if (!resp.ok) throw new Error('Webhook-Löschung fehlgeschlagen');
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user