1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-14 14:49:01 +09:00
YuruToot/app/javascript/flavours/glitch/api/notification_policies.ts
Essem 939af853e6 [Glitch] Fix extra slash on notification policy request
Port 2e03dc9fbf to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2024-08-12 17:49:55 +02:00

10 lines
447 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);