From fc90d38893ae81b83884c3f5c85d05d564f1de33 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Tue, 22 Nov 2016 22:59:54 +0100
Subject: Moving some counter queries out of subqueries in the API

---
 app/assets/javascripts/components/middleware/errors.jsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'app/assets/javascripts/components/middleware/errors.jsx')

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) {
-- 
cgit 

