combine logic

This commit is contained in:
Brian Cao 2022-09-13 09:18:58 -07:00
parent c73d07d329
commit dd54fb3d2c

View File

@ -72,18 +72,10 @@ function getFilterQuery(column, filters = {}, params = []) {
switch (key) {
case 'url':
arr.push(`and ${key}=$${params.length + 1}`);
params.push(decodeURIComponent(filter));
break;
case 'os':
case 'browser':
case 'device':
case 'country':
arr.push(`and ${key}=$${params.length + 1}`);
params.push(decodeURIComponent(filter));
break;
case 'event_name':
arr.push(`and ${key}=$${params.length + 1}`);
params.push(decodeURIComponent(filter));