fixes yo
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user