mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-01-21 23:22:56 -05:00
58b9b80be5
Port 170157570447d30732445f6339b0c7b2fe7617d8 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
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>('/v2/notifications/policy');
|
|
|
|
export const apiUpdateNotificationsPolicy = (
|
|
policy: Partial<NotificationPolicyJSON>,
|
|
) => apiRequestPut<NotificationPolicyJSON>('/v2/notifications/policy', policy);
|