This commit is contained in:
2026-02-15 01:51:34 -06:00
parent ba8c6e9050
commit c29ec8e210
6 changed files with 183 additions and 18 deletions

View File

@@ -646,6 +646,28 @@ export const api = {
body: JSON.stringify({ endpoint }),
});
},
getSettings: async () => {
return request<{
discord_webhook: string;
discord_enabled: boolean;
ntfy_topic: string;
ntfy_enabled: boolean;
web_push_enabled: boolean;
}>('/api/notifications/settings', { method: 'GET' });
},
updateSettings: async (data: {
discord_webhook?: string;
discord_enabled?: boolean;
ntfy_topic?: string;
ntfy_enabled?: boolean;
}) => {
return request<{ updated: boolean }>('/api/notifications/settings', {
method: 'PUT',
body: JSON.stringify(data),
});
},
},
// Medications