From 3cedf376479ac8b1ada724e8eaa49052c92b68c7 Mon Sep 17 00:00:00 2001 From: Andrew Nicolaou Date: Wed, 15 May 2019 16:39:53 +0200 Subject: [PATCH] Changes API_KEY_REMOVED action constant to match API_KEY_CREATED --- client/constants.js | 2 +- client/modules/User/actions.js | 2 +- client/modules/User/reducers.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/constants.js b/client/constants.js index 08b3f81b..5facb1f3 100644 --- a/client/constants.js +++ b/client/constants.js @@ -20,7 +20,7 @@ export const AUTH_ERROR = 'AUTH_ERROR'; export const SETTINGS_UPDATED = 'SETTINGS_UPDATED'; export const API_KEY_CREATED = 'API_KEY_CREATED'; -export const REMOVED_API_KEY = 'REMOVED_API_KEY'; +export const API_KEY_REMOVED = 'API_KEY_REMOVED'; export const SET_PROJECT_NAME = 'SET_PROJECT_NAME'; diff --git a/client/modules/User/actions.js b/client/modules/User/actions.js index 522e428f..93a874fb 100644 --- a/client/modules/User/actions.js +++ b/client/modules/User/actions.js @@ -240,7 +240,7 @@ export function removeApiKey(keyId) { axios.delete(`${ROOT_URL}/account/api-keys/${keyId}`, { withCredentials: true }) .then((response) => { dispatch({ - type: ActionTypes.REMOVED_API_KEY, + type: ActionTypes.API_KEY_REMOVED, user: response.data }); }) diff --git a/client/modules/User/reducers.js b/client/modules/User/reducers.js index ea535b8f..00454acd 100644 --- a/client/modules/User/reducers.js +++ b/client/modules/User/reducers.js @@ -31,7 +31,7 @@ const user = (state = { authenticated: false }, action) => { return Object.assign({}, state, { emailVerificationTokenState: 'invalid' }); case ActionTypes.SETTINGS_UPDATED: return { ...state, ...action.user }; - case ActionTypes.REMOVED_API_KEY: + case ActionTypes.API_KEY_REMOVED: return { ...state, ...action.user }; case ActionTypes.API_KEY_CREATED: return { ...state, ...action.user };