* return hits from elasticsearch and add in sort param to templates
* use returned hits from elasticsearch for navigation
* mix format
* fix gallery pagination
* add missing fields to search help dropdown
* unused variable
* First (not-yet-working) attempt at self-renaming
* Actually working renames
* last_renamed_at
* Prevent renaming while banned
* Move username changing from controller to model
* Username change logging
* Rate limiting for username changes
* username -> name and format
* add UBQ
* modify interval
Co-authored-by: Joey <joeyponi@gmail.com>
* added new method (POST) to /api/v1/json/images
* Cleaned up debug
* added require_authorization plug, fixed up issues with image_controller
* make user do work
* Fixed inefficient function use
* added api fingerprinting
* more robust
* corrected holdover from merging files
* 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>
* 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
* Adding routes for /forums
Adding routes for new /forums endpoints
* New API Routes
`/forum`
`/forum/:forum_id`
* Add New API Routes
`/forums/:forum_id/topics/:topic_id/`
`/forums/:forum_id/topics/:topic_id/:post_id`
* Adds New API Routes
`/forums/:forum_id/topics`
`/forums/:forum_id/topics/:topic_id`
* Forum JSON formatter
* Updated
Correctly filters out things that should not be shown.
* Added topic JSON filter
* Added correct pagination
* Spacing and neatened
* Cleaned up
Consolidated queries and neatened up spacing.
Fixed name
* Removed unneeded aliases
* Cleaned up
Consolidated queries
Fixed spacing
Removed unneeded aliases
* Cleaned up
Spacing
* Cleaned up
spacing
* Depluralized
* Cleaned up
Removed space
* Removed extra spaces
* Removed extra spaces
* Removed extra spaces
* Removed preloads
* Cleaned up
Grouped clauses
* Consolodated further
* Cleaned up preloads
* Cleaned up
Preloads
consolidated clauses
grouped clauses
* Cleaned up
removed `id`
`locked`
* Removed topic_id
Not useful since the API client should already know it.
* More consolodation of terms
* Add total post count
* Removed unneeded variable
* Last cleanup, I swear.