More work on pl-api migration

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-08-06 23:19:00 +02:00
parent 32c68a9221
commit 0fc8a2993f
53 changed files with 119 additions and 183 deletions

View File

@ -23,11 +23,11 @@ const createPushSubscription = (params: CreatePushNotificationsSubscriptionParam
(dispatch: AppDispatch, getState: () => RootState) => {
dispatch({ type: PUSH_SUBSCRIPTION_CREATE_REQUEST, params });
return getClient(getState).pushNotifications.createSubscription(params)
.then((subscription) =>
dispatch({ type: PUSH_SUBSCRIPTION_CREATE_SUCCESS, params, subscription }),
).catch(error =>
dispatch({ type: PUSH_SUBSCRIPTION_CREATE_FAIL, params, error }),
);
.then((subscription) =>
dispatch({ type: PUSH_SUBSCRIPTION_CREATE_SUCCESS, params, subscription }),
).catch(error =>
dispatch({ type: PUSH_SUBSCRIPTION_CREATE_FAIL, params, error }),
);
};
const fetchPushSubscription = () =>