AmbireTech/adex-market

/campaigns: fast filter by ?byEarner

Ivshti opened this issue · 2 comments

query parameter that returns campaigns where there's a certain earner

do that by doing something like (not sure if correct) ```
{ [status.lastApprovedBalances.${req.params.earner}]: {$exists: true} }


this is required here: https://github.com/AdExNetwork/adex-relayer/blob/master/routineAuthsLoop.js#L42

this is basically the same as #17 but I'm reopening it cause the previous implementation appears to be querying everything that has `balances` and filtering it server side; we want to filter it on a DB query level, for performance

There's no ?byEarner now, again