1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-17 16:18:36 +09:00
YuruToot/app/javascript/mastodon/api/notification_policies.ts

10 lines
435 B
TypeScript
Raw Normal View History

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>,
2024-06-26 01:53:03 +09:00
) => apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', policy);