2024-06-25 22:45:41 +09:00
|
|
|
import { apiRequestGet, apiRequestPut } from 'flavours/glitch/api';
|
2024-06-18 22:23:30 +09:00
|
|
|
import type { NotificationPolicyJSON } from 'flavours/glitch/api_types/notification_policies';
|
|
|
|
|
|
|
|
export const apiGetNotificationPolicy = () =>
|
2024-06-25 22:45:41 +09:00
|
|
|
apiRequestGet<NotificationPolicyJSON>('/v1/notifications/policy');
|
2024-06-18 22:23:30 +09:00
|
|
|
|
|
|
|
export const apiUpdateNotificationsPolicy = (
|
|
|
|
policy: Partial<NotificationPolicyJSON>,
|
|
|
|
) =>
|
2024-06-25 22:45:41 +09:00
|
|
|
apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', {
|
|
|
|
data: policy,
|
|
|
|
});
|