lots of changes leave me alone its better now

This commit is contained in:
2026-02-14 04:35:40 -06:00
parent 97a166f5aa
commit 4d3a9fbd54
13 changed files with 438 additions and 57 deletions

View File

@@ -546,6 +546,29 @@ export const api = {
},
},
// Notifications
notifications: {
getVapidPublicKey: async () => {
return request<{ public_key: string }>('/api/notifications/vapid-public-key', {
method: 'GET',
});
},
subscribe: async (subscription: PushSubscriptionJSON) => {
return request<{ subscribed: boolean }>('/api/notifications/subscribe', {
method: 'POST',
body: JSON.stringify(subscription),
});
},
unsubscribe: async (endpoint: string) => {
return request<{ unsubscribed: boolean }>('/api/notifications/subscribe', {
method: 'DELETE',
body: JSON.stringify({ endpoint }),
});
},
},
// Medications
medications: {
list: async () => {
@@ -653,6 +676,9 @@ export const api = {
};
scheduled_times: string[];
taken_times: string[];
is_prn?: boolean;
is_next_day?: boolean;
is_previous_day?: boolean;
}>>('/api/medications/today', { method: 'GET' });
},