Closed
Description
Here is the simplest implementation that even doesn't introduce new methods:
- modify
SeriesController.searchSeriesByCatalog()
method to do the following:- after search for series in database (see
switch
) but right before passing the results to a view (model.addAttribute()
)- if feature is enabled
- and if checkbox is selected
- and if a user isn't anonymous
- iterate over results and filter out the series that a user doesn't have in its collection (use
CollectionService.isSeriesInCollection()
)
- after search for series in database (see
Yeah, this is kind of ugly, use extra memory, leads to N+1 query to database but it's fastest approach to implement without adding a lot of code.
This is part of #673