blob: e914ba56687f14bf38c3be2e00b63224d01922c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import { call, put } from 'redux-saga/effects'
import { deleteCurrentUserSucceeded } from '../actions/users'
import { deleteUser } from '../api/routes/users'
export function* onDeleteCurrentUser(action) {
try {
yield call(deleteUser, action.userId)
yield put(deleteCurrentUserSucceeded())
} catch (error) {
console.error(error)
}
}
|