2024-06-25 13:45:41 +00:00
|
|
|
import { apiRequestGet, apiRequestPut } from 'mastodon/api';
|
2024-06-18 13:23:30 +00:00
|
|
|
import type { NotificationPolicyJSON } from 'mastodon/api_types/notification_policies';
|
|
|
|
|
|
|
|
export const apiGetNotificationPolicy = () =>
|
2024-08-11 21:28:43 +00:00
|
|
|
apiRequestGet<NotificationPolicyJSON>('v2/notifications/policy');
|
2024-06-18 13:23:30 +00:00
|
|
|
|
|
|
|
export const apiUpdateNotificationsPolicy = (
|
|
|
|
policy: Partial<NotificationPolicyJSON>,
|
2024-08-11 21:28:43 +00:00
|
|
|
) => apiRequestPut<NotificationPolicyJSON>('v2/notifications/policy', policy);
|