blob: 31d4dd4f01ba43516f52defb29aef66554b23380 (
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);
}
}
|