Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / pass / store / sagas / invites / invite-remove.saga.ts
blobedd1867cecec5e8206651972bbf75cf358375993
1 import { put, takeEvery } from 'redux-saga/effects';
3 import { removeInvite } from '@proton/pass/lib/invites/invite.requests';
4 import { inviteRemoveFailure, inviteRemoveIntent, inviteRemoveSuccess } from '@proton/pass/store/actions';
6 function* removeInviteWorker({ payload, meta: { request } }: ReturnType<typeof inviteRemoveIntent>) {
7     try {
8         yield removeInvite(payload);
9         yield put(inviteRemoveSuccess(request.id, payload.shareId, payload.inviteId));
10     } catch (err) {
11         yield put(inviteRemoveFailure(request.id, err));
12     }
15 export default function* watcher() {
16     yield takeEvery(inviteRemoveIntent.match, removeInviteWorker);