From bd10bdc3edb70946ff5386b87f50bd38d19f4886 Mon Sep 17 00:00:00 2001 From: eddy Date: Wed, 15 Apr 2026 11:38:42 +0200 Subject: [PATCH] Push --- src/api/axiosInstance.js | 4 ++-- src/pages/Notification/PushPage.jsx | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/api/axiosInstance.js b/src/api/axiosInstance.js index f8c294f..418dcf5 100644 --- a/src/api/axiosInstance.js +++ b/src/api/axiosInstance.js @@ -7,8 +7,8 @@ const axiosInstance = axios.create({ */ const axiosInstance = axios.create({ - //baseURL: 'https://api.testsite.deinedorfapp.de/api', - baseURL: 'http://localhost:5173/api', + baseURL: 'https://api.testsite.deinedorfapp.de/api', + //baseURL: 'http://localhost:5173/api', headers: { 'Content-Type': 'application/json' }, }); diff --git a/src/pages/Notification/PushPage.jsx b/src/pages/Notification/PushPage.jsx index e75efa4..78a5f60 100644 --- a/src/pages/Notification/PushPage.jsx +++ b/src/pages/Notification/PushPage.jsx @@ -9,7 +9,7 @@ import axiosInstance from '../../api/axiosInstance.js'; export default function PushPage() { const [title, setTitle] = useState(''); const [body, setBody] = useState(''); - const [target, setTarget] = useState('all'); + const [target, setTarget] = useState('NOTIFICATION_ALL'); const [loading, setLoading] = useState(false); const [result, setResult] = useState(null); // { type: 'success'|'error', msg } @@ -18,8 +18,8 @@ export default function PushPage() { setLoading(true); setResult(null); try { - await axiosInstance.post('/push', { title, body, target }); - setResult({ type: 'success', msg: 'Notification erfolgreich gesendet!' }); + await axiosInstance.post('/notification/manual', { title, body, targetPlatform: target, }); + setResult({ type: 'success', msg: 'Notification erfolgreich zur Queue hinzugefügt!' }); setTitle(''); setBody(''); } catch (err) { @@ -38,9 +38,9 @@ export default function PushPage() { Empfänger