fenya123 / forum123

Flask application written for educational purposes.
http://193.124.115.171/
1 stars 1 forks source link

124: Add filtering to get topics REST endpoint #131

Closed EugeneTurkin closed 1 year ago

EugeneTurkin commented 1 year ago

We need to add filtration to the get_topics REST route. Filter should be possible by the following attributes: author_id, created_before, created_after.

Request example

GET /topics?author_id=42&author_id=24&author_id=18

Response example

[
    # topics with author_id 42 or 24 or 18
]

We suppose that all datetime related query params will be sent in UTC timezone in the following format:

'2023-04-24 05:10:20.782336'

Request example

GET /topics?created_after=2023-04-24 04:10:20.782336&created_before=2023-04-24 05:10:20.782336

So in the scope of this task we need to add filtration for get_topics route.