Here we can create a separate case, instead of two methods, let's have one
interface MoviesFilter {
pageIndex,
pageSize,
filter // object
}
const getMovies = (filter: MoviesFilter = createDefaultMoviesFilter()) {
}
for the url filtering logic (api url generation) we can create a business method ina separate file and apply TDD to implement it.
const getMoviesByGenreUrl = `${getMoviesURL}?genres_like=${genre}`;
We should consider several cases, like, or exact string...
Here we can create a separate case, instead of two methods, let's have one
for the url filtering logic (api url generation) we can create a business method ina separate file and apply TDD to implement it.
We should consider several cases, like, or exact string...