summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/profile.js14
-rw-r--r--src/actions/users.js18
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
+ };
+}