catstodon/app/javascript/flavours/glitch/api/notification_policies.ts
Claire 58b9b80be5 [Glitch] Add option to ignore filtered notifications to the web interface
Port 1701575704 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2024-08-09 17:24:11 +02:00

9 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>('/v2/notifications/policy');
export const apiUpdateNotificationsPolicy = (
policy: Partial<NotificationPolicyJSON>,
) => apiRequestPut<NotificationPolicyJSON>('/v2/notifications/policy', policy);