1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-15 07:09:03 +09:00
YuruToot/app/javascript/flavours/glitch/api/notification_policies.ts

11 lines
441 B
TypeScript
Raw Normal View History

import { apiRequest } from 'flavours/glitch/api';
import type { NotificationPolicyJSON } from 'flavours/glitch/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);