Update selected item color in Pass menu
[ProtonMail-WebClient.git] / packages / pass / store / sagas / monitor / monitor-toggle.saga.ts
blob202aa51b22d934abec17296831f16a2ed88a4a0f
1 import { put } from 'redux-saga/effects';
3 import { setMonitorSettings } from '@proton/pass/lib/monitor/monitor.request';
4 import { getBreaches, monitorToggle } from '@proton/pass/store/actions';
5 import { withRevalidate } from '@proton/pass/store/request/enhancers';
6 import { createRequestSaga } from '@proton/pass/store/request/sagas';
7 import type { UpdateUserMonitorStateRequest } from '@proton/pass/types';
9 export default createRequestSaga({
10     actions: monitorToggle,
11     call: function* (data) {
12         const res: UpdateUserMonitorStateRequest = yield setMonitorSettings(data);
13         yield put(withRevalidate(getBreaches.intent()));
14         return res;
15     },
16 });