mirror of
https://github.com/funamitech/mastodon
synced 2024-12-18 00:29:13 +09:00
13 lines
454 B
TypeScript
13 lines
454 B
TypeScript
import { apiRequestGet, apiRequestPut } from 'mastodon/api';
|
|
import type { NotificationPolicyJSON } from 'mastodon/api_types/notification_policies';
|
|
|
|
export const apiGetNotificationPolicy = () =>
|
|
apiRequestGet<NotificationPolicyJSON>('/v1/notifications/policy');
|
|
|
|
export const apiUpdateNotificationsPolicy = (
|
|
policy: Partial<NotificationPolicyJSON>,
|
|
) =>
|
|
apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', {
|
|
data: policy,
|
|
});
|