mirror of
https://github.com/funamitech/mastodon
synced 2024-12-15 23:28:31 +09:00
7d89d1f186
Port 2c7eed1fa1
to glitch-soc
10 lines
449 B
TypeScript
10 lines
449 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', policy);
|