mirror of
https://github.com/funamitech/mastodon
synced 2024-12-14 22:59:46 +09:00
3a20290915
Port 547e97945d
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,
|
|
});
|