Conversation
| def get(self): | ||
| """List all customers""" | ||
| return customer_dao.get_all() | ||
| return customer_dao.get_all(conditions=request.args) |
There was a problem hiding this comment.
What if you have some query like this?
/activities?a=1&b=2&pageSize=0&orders["start_date"]="DESC"&limit=1
This is not going to work, because a and b are the attributes but you are filtering for whatever it is specified in the request arguments.
There was a problem hiding this comment.
In addition, it would be nice to filter per namespace that the attributes you want to filter by are valid.
There was a problem hiding this comment.
What if you have some query like this?
/activities?a=1&b=2&pageSize=0&orders["start_date"]="DESC"&limit=1This is not going to work, because
aandbare the attributes but you are filtering for whatever it is specified in the request arguments.
Do we have filtering and sorting arguments right now?
There was a problem hiding this comment.
The repository has sorting capabilities right now. For instance, The repository for time entries orders the results by start_date. We could do this dynamically in the future.
|
Also, please rename the commit message.
This will increase the version with a minor update. |
6f0a906 to
beb8c84
Compare
a4b6cb8 to
7f8b00d
Compare
7f8b00d to
44a4260
Compare
fix: #91 adding filter by attributes