Refactor admin search switch/case block
maybe refactor to use a general json filter handler & apply this handler to the fingerprint and metadata fields -- we'll have to do some error handling maybe, though and Ben: Regarding all the cases starting here
https://github.com/steemit/faucet/pull/364/files#diff-c3a36f0b10b2fd1722b9c20199e08e35R82what do you think about having a general handler for json nested property filters, and just letting the user input any path they want for json column filters? (this includes theactions.metadata,users.fingerprint, andusers.metadatacols as of now) a reusable handler would save quite a bit of code & can be applied for at least the users.metadata field immediately
Iain:
yes that makes sense.
```case 'fingerprint':
andList.push({
fingerprint: where(
literal("fingerprint -> `$${some_user_input}`),
{ [nRegexp]: value }
),
});
break;```
where
${some_user_input}would be whatever they put after 'fingerprint' ditto for metadata. not looked at actions.