mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-01-21 23:22:56 -05:00
3a20290915
Port 547e97945df0abc68dc473ed60d2faeb2feb2b06
13 lines
468 B
TypeScript
13 lines
468 B
TypeScript
import { apiRequestGet, apiRequestPut } from 'flavours/glitch/api';
|
|
import type { NotificationPolicyJSON } from 'flavours/glitch/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,
|
|
});
|