lots of changes leave me alone its better now
This commit is contained in:
@@ -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' });
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user