diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-19 15:39:58 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:43 +0200 |
| commit | 19033b8460cb43dc2fa34a2cffa932b5efe111ca (patch) | |
| tree | 79bde2093acce8d8192d27e288d61bc53cf99e07 /src/actions | |
| parent | 434be6d21ad665cb6abdf5138d0c563efbfe00b4 (diff) | |
Add profile page
Diffstat (limited to 'src/actions')
| -rw-r--r-- | src/actions/profile.js | 14 | ||||
| -rw-r--r-- | src/actions/users.js | 18 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/actions/profile.js b/src/actions/profile.js new file mode 100644 index 00000000..421e7602 --- /dev/null +++ b/src/actions/profile.js @@ -0,0 +1,14 @@ +export const OPEN_DELETE_PROFILE_MODAL = "OPEN_DELETE_PROFILE_MODAL"; +export const CLOSE_DELETE_PROFILE_MODAL = "CLOSE_DELETE_PROFILE_MODAL"; + +export function openDeleteProfileModal() { + return { + type: OPEN_DELETE_PROFILE_MODAL + }; +} + +export function closeDeleteProfileModal() { + return { + type: CLOSE_DELETE_PROFILE_MODAL + }; +} diff --git a/src/actions/users.js b/src/actions/users.js index 093adddd..04a5b95a 100644 --- a/src/actions/users.js +++ b/src/actions/users.js @@ -1,5 +1,7 @@ export const FETCH_AUTHORIZATIONS_OF_CURRENT_USER = "FETCH_AUTHORIZATIONS_OF_CURRENT_USER"; export const FETCH_AUTHORIZATIONS_OF_CURRENT_USER_SUCCEEDED = "FETCH_AUTHORIZATIONS_OF_CURRENT_USER_SUCCEEDED"; +export const DELETE_CURRENT_USER = "DELETE_CURRENT_USER"; +export const DELETE_CURRENT_USER_SUCCEEDED = "DELETE_CURRENT_USER_SUCCEEDED"; export function fetchAuthorizationsOfCurrentUser() { return (dispatch, getState) => { @@ -17,3 +19,19 @@ export function fetchAuthorizationsOfCurrentUserSucceeded(authorizationsOfCurren authorizationsOfCurrentUser }; } + +export function deleteCurrentUser() { + return (dispatch, getState) => { + const {auth} = getState(); + dispatch({ + type: DELETE_CURRENT_USER, + userId: auth.userId + }); + }; +} + +export function deleteCurrentUserSucceeded() { + return { + type: DELETE_CURRENT_USER_SUCCEEDED + }; +} |
