added information on 400 Bad Request for empty requests to search

main
Inga 🏳‍🌈 5 months ago
parent c7b985c34e
commit 393a1e201d
  1. 3
      solution.md

@ -178,6 +178,9 @@ Another thing regarding search is that it seems that for most fields, it does no
So I limited the search feature to a subset of fields, as described in `SearchFilters` type in [`types.ts`](src/types.ts)
and in `SearchDto` in [`movies.controller.ts`](src/movies.controller.ts).
And finally, it does not make a lot of sense to search by an empty query (we probably don't want to just list our entire database to whoever
did not enter any search filters), so I return a 400 Bad Request errors for request to search endpoint with empty query.
## Testing
I did not have any time to come up with a good test cases, so most tests work on samples of data from OMDB and on provided sample JSONs.

Loading…
Cancel
Save