mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-12 22:39:03 +01:00
af0a1a8774
Port d558dfd77d
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
16 lines
601 B
TypeScript
16 lines
601 B
TypeScript
import {
|
|
apiGetNotificationPolicy,
|
|
apiUpdateNotificationsPolicy,
|
|
} from 'flavours/glitch/api/notification_policies';
|
|
import type { NotificationPolicy } from 'flavours/glitch/models/notification_policy';
|
|
import { createDataLoadingThunk } from 'flavours/glitch/store/typed_functions';
|
|
|
|
export const fetchNotificationPolicy = createDataLoadingThunk(
|
|
'notificationPolicy/fetch',
|
|
() => apiGetNotificationPolicy(),
|
|
);
|
|
|
|
export const updateNotificationsPolicy = createDataLoadingThunk(
|
|
'notificationPolicy/update',
|
|
(policy: Partial<NotificationPolicy>) => apiUpdateNotificationsPolicy(policy),
|
|
);
|