diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-25 17:48:12 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:44 +0200 |
| commit | c47a27b826f7d76410308a4151611a366f9eaf46 (patch) | |
| tree | c1ca374204714cedabcacb8620848b903a0bf8d6 /src/sagas/profile.js | |
| parent | 1ddbbd3563af77a218020021ea50a8832900b4db (diff) | |
Fetch and display datacenter topology
Diffstat (limited to 'src/sagas/profile.js')
| -rw-r--r-- | src/sagas/profile.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sagas/profile.js b/src/sagas/profile.js new file mode 100644 index 00000000..6a72e7c2 --- /dev/null +++ b/src/sagas/profile.js @@ -0,0 +1,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.log(error); + } +} |
