mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-11 19:49:03 +01:00
17 lines
580 B
TypeScript
17 lines
580 B
TypeScript
|
import {
|
||
|
apiGetNotificationPolicy,
|
||
|
apiUpdateNotificationsPolicy,
|
||
|
} from 'mastodon/api/notification_policies';
|
||
|
import type { NotificationPolicy } from 'mastodon/models/notification_policy';
|
||
|
import { createDataLoadingThunk } from 'mastodon/store/typed_functions';
|
||
|
|
||
|
export const fetchNotificationPolicy = createDataLoadingThunk(
|
||
|
'notificationPolicy/fetch',
|
||
|
() => apiGetNotificationPolicy(),
|
||
|
);
|
||
|
|
||
|
export const updateNotificationsPolicy = createDataLoadingThunk(
|
||
|
'notificationPolicy/update',
|
||
|
(policy: Partial<NotificationPolicy>) => apiUpdateNotificationsPolicy(policy),
|
||
|
);
|