Add categoryFilter factory.
[mkws-moved-to-github.git] / src / mkws-filter.js
index e356217..7d9fac0 100644 (file)
@@ -92,8 +92,6 @@ function targetFilter(id, name) {
         id: id,
         name: name
     };
-
-    return res;
 }
 
 function fieldFilter(field, value) {
@@ -103,3 +101,10 @@ function fieldFilter(field, value) {
         value: value
     };
 }
+
+function categoryFilter(id) {
+    return {
+        type: 'category',
+        id: id,
+    };
+}