mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-12-01 12:30:16 -05:00
11 lines
427 B
TypeScript
11 lines
427 B
TypeScript
|
import { apiRequest } from 'mastodon/api';
|
||
|
import type { NotificationPolicyJSON } from 'mastodon/api_types/notification_policies';
|
||
|
|
||
|
export const apiGetNotificationPolicy = () =>
|
||
|
apiRequest<NotificationPolicyJSON>('GET', '/v1/notifications/policy');
|
||
|
|
||
|
export const apiUpdateNotificationsPolicy = (
|
||
|
policy: Partial<NotificationPolicyJSON>,
|
||
|
) =>
|
||
|
apiRequest<NotificationPolicyJSON>('PUT', '/v1/notifications/policy', policy);
|