mirror of https://github.com/glitch-soc/mastodon
10 lines
447 B
TypeScript
10 lines
447 B
TypeScript
import { apiRequestGet, apiRequestPut } from 'flavours/glitch/api';
|
|
import type { NotificationPolicyJSON } from 'flavours/glitch/api_types/notification_policies';
|
|
|
|
export const apiGetNotificationPolicy = () =>
|
|
apiRequestGet<NotificationPolicyJSON>('v2/notifications/policy');
|
|
|
|
export const apiUpdateNotificationsPolicy = (
|
|
policy: Partial<NotificationPolicyJSON>,
|
|
) => apiRequestPut<NotificationPolicyJSON>('v2/notifications/policy', policy);
|