diff --git a/core/server/web/shared/middlewares/labs.js b/core/server/web/shared/middlewares/labs.js
index <HASH>..<HASH> 100644
--- a/core/server/web/shared/middlewares/labs.js
+++ b/core/server/web/shared/middlewares/labs.js
@@ -1,21 +1,15 @@
 const labsUtil = require('../../../services/labs');
 const common = require('../../../lib/common');
 
-const labs = {
-    subscribers(req, res, next) {
-        if (labsUtil.isSet('subscribers') === true) {
-            return next();
-        } else {
-            return next(new common.errors.NotFoundError());
-        }
-    },
-    members(req, res, next) {
-        if (labsUtil.isSet('members') === true) {
-            return next();
-        } else {
-            return next(new common.errors.NotFoundError());
-        }
+const labs = flag => (req, res, next) => {
+    if (labsUtil.isSet(flag) === true) {
+        return next();
+    } else {
+        return next(new common.errors.NotFoundError());
     }
 };
 
+labs.subscribers = labs('subscribers');
+labs.members = labs('members');
+
 module.exports = labs;
Refactored labs middleware to remove duplication

no-issue

Also exposes a generic interface now.