* Featured image hiding
This makes sure the Featured Image on the front page obeys user hiding.
* Optimized
Took the `hidden=1` check out of the `WHERE` clause.
* proper anti join
Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
This used to be allowed in the old searching with the `deleted` param for all users.
This should correctly add back the ability (using the new `del` param) to specify `del=1` for any user/API search, but correctly block them from doing the more specialized "staff only" searching.
* Fix for module placement
Correcting my own mistake when I first made these routes
* Correcting module location
* Correcting module location
* Fix
Fixes a potential crash when no posts are returned.
* Add route
`/api/v1/json/features`
Shows current featured image
* Add route
`/api/v1/json/features`
Shows current featured image.
* Removed binding
* Moving this file to a more appropriate name.
* Correctly named and placed
Correctly named and placed to match its module name
* Updated per review
* Changed as per review
Renamed to `PhilomenaWeb.Api.Json.FeaturedController`
Moved to `lib/philomena_web/controllers/api/json/featured_controller.ex`
* Updated route
Route `/api/v1/json/images/featured` now uses `PhilomenaWeb.Api.Json.FeaturedController`
* like this
Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
* Fix for distance
Fixes the `distance` to search not being passed through to `ImageReverse.images()`
`set_scraper_cache` passes the `distance` through into `params`
`create` normalizes and inserts the result into the params passed to `ImageReverse.images()`
`normalize_dist` checks if there is a `distance` set, adds a leading 0 to it (to account for values like `.5`, which would crash `Float.parse()`), and turns it back into a well-formatted string for `ImageReverse.images()`
* Fixed space