diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-22 22:59:54 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-22 22:59:54 +0100 |
commit | fc90d38893ae81b83884c3f5c85d05d564f1de33 (patch) | |
tree | 8d881992a6afe8519277e6206c6289f574c00337 /app/assets | |
parent | 4b5b953d4223776860bcccb56d2f9c7144dc302e (diff) |
Moving some counter queries out of subqueries in the API
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/components/middleware/errors.jsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/middleware/errors.jsx b/app/assets/javascripts/components/middleware/errors.jsx index fb161fc4c..3a1473bc1 100644 --- a/app/assets/javascripts/components/middleware/errors.jsx +++ b/app/assets/javascripts/components/middleware/errors.jsx @@ -1,11 +1,13 @@ import { showAlert } from '../actions/alerts'; +const defaultSuccessSuffix = 'SUCCESS'; const defaultFailSuffix = 'FAIL'; export default function errorsMiddleware() { return ({ dispatch }) => next => action => { if (action.type) { const isFail = new RegExp(`${defaultFailSuffix}$`, 'g'); + const isSuccess = new RegExp(`${defaultSuccessSuffix}$`, 'g'); if (action.type.match(isFail)) { if (action.error.response) { |