Commit graph

374 commits

Author SHA1 Message Date
byte[]
406c7dd74b fixes #97: add new route for changing anonymity status of upload 2020-04-30 00:14:14 -04:00
byte[]
be520b1d7c unsubscribe users from privileged topics when their role is updated, fixes #30 2020-04-29 23:05:19 -04:00
Luna D
fb08f555f4
reindex image on source update (#94) 2020-04-19 15:05:42 -04:00
byte[]
5f9e9d98a6 api relevance sorting, fixes #83 2020-04-08 11:11:58 -04:00
byte[]
603c8d4867 add ranch connection drainer 2020-04-07 00:21:44 -04:00
byte[]
d09d77c0cd more careful checking of parameter values, fixes #75 2020-04-05 11:56:53 -04:00
byte[]
904bada39e wilson 2020-04-01 00:42:46 -04:00
byte[]
1c12c010fa mix format 2020-03-31 11:39:11 -04:00
liamwhite
723bfa213f
Use JSON views for API (#64)
* AwardJson, LinkJson, UserJson to views

* FilterJson -> view

* ForumJson -> view

* TopicJson -> view

* PostJson -> view

* TagJson -> view

* CommentJson -> view

* GalleryJson -> view
2020-03-29 21:11:38 -04:00
SomewhatDamaged
196c5e14b6
API additions for user interactions on single images (#63)
* API additions for user interactions on single images

* removed ability to render without supplying interactions
2020-03-29 20:51:35 -04:00
liamwhite
b1de5389eb
Change ImageJson to view (#62) 2020-03-29 19:39:36 -04:00
byte[]
21df6bc307 fixes #52 and #53 2020-03-29 18:36:24 -04:00
SomewhatDamaged
44a20a7888
Adjusted to suit standard (#58) 2020-03-27 01:07:24 -04:00
byte[]
b20217925b ensure reports are reindexed when merged, fixes #51 2020-03-26 13:42:11 -04:00
byte[]
bc87b287e0 fixes commission counter updates (#56) 2020-03-26 13:18:45 -04:00
SomewhatDamaged
84ac9d27d7
Adds /api/v1/json/filters endpoints (#55)
* Adds /api/v1/json/filters endpoint

* Modified as per discussion

* Using Repo.paginate properly now

* Added total count to output
2020-03-25 11:32:25 -04:00
Luna D
da5135bc11
mix format 2020-03-13 09:21:17 -04:00
SomewhatDamaged
7ddd8b8ec4
New /filters/:id API endpoint (#48)
* New /filters/:id API endpoint

* Fix to use can? permissions

* Fixes requested
2020-03-12 12:53:25 -04:00
byte[]
37a2d014cd fix permission error 2020-03-05 02:04:21 -05:00
Luna D
8378e07bb8
remove auth from notification read 2020-03-03 13:54:47 -05:00
Byron Mulvogue
7a164944b4 Fixed user.avatar failure. Ran mix format. 2020-03-03 11:23:53 +00:00
Byron Mulvogue
297e0909d6 This will add the endpoint to the API. 2020-03-03 03:49:02 +00:00
Luna D
3fdae6b99c
that was not necessary 2020-02-22 11:31:57 -05:00
Luna D
d5337eb75a
more appropriate comment fix 2020-02-22 10:31:30 -05:00
Nebbie Zebbie
c7208a3098 Fix moderators not being able to unstick topics 2020-02-21 07:24:45 +00:00
Luna D
9c7bbc127b
fix assistants not being able to do user links 2020-02-17 12:21:19 -05:00
byte[]
e4e20033e7 fix misc pagination issues 2020-02-10 22:26:45 -05:00
byte[]
f664be4f85 preload tags on update failure 2020-02-06 17:27:26 -05:00
byte[]
9ea7980e3f hex upgrades 2020-02-06 17:24:41 -05:00
byte[]
14e6439ea7 run formatter 2020-02-01 11:04:11 -05:00
Nebbie Zebbie
7cee5f38ee Image hide reason changing 2020-01-31 23:50:50 +00:00
Nebbie Zebbie
d35b7a2b0e Allow repairing deleted images 2020-01-31 20:10:15 +00:00
SomewhatDamaged
c972f00cdc Featured image hiding (#24)
* 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>
2020-01-26 18:04:30 -05:00
byte[]
f558e76cc8 thanks for the tip! 2020-01-23 12:32:31 -05:00
byte[]
ce534b7962 propagate cookies correctly into form values 2020-01-11 14:35:02 -05:00
byte[]
d184ee0817 copy and customize filters 2020-01-11 14:24:30 -05:00
byte[]
3ac8687c18 allow get-based reverse searching 2020-01-11 13:51:14 -05:00
byte[]
ed44160603 run formatter 2020-01-10 23:20:19 -05:00
byte[]
4ac63f9f4e use HTML escaping in RSS template, fixes #21 2020-01-10 12:43:56 -05:00
SomewhatDamaged
035b887f53 Somewhat damaged patch 1 (#20)
* Add new route

Adding route for
`/api/v1/json/posts/:id`

* Adding route controller

Adding route for
`/api/v1/json/posts/:id`
2020-01-07 10:35:24 -05:00
SomewhatDamaged
e918375c83 Somewhat damaged patch 1 (#19)
* 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.
2020-01-07 02:02:49 -05:00
SomewhatDamaged
24b9863699 Featured image API route (#18)
* 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>
2020-01-05 20:09:45 -05:00
byte[]
11e908ef14 batch tagger should resolve aliases and implications 2020-01-03 10:43:41 -05:00
SomewhatDamaged
8e39c06940 Fix for distance (#16)
* 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
2020-01-03 10:37:20 -05:00
byte[]
7ee6bf379f apparently that was necessary 2020-01-02 19:00:47 -05:00
SomewhatDamaged
ae5bfe14e4 Add /forums API Endpoints (#14)
* 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.
2020-01-02 17:47:12 -05:00
Jeremy Tan Jie Rui
c4e6a988d4 Don't put UTF-8 in search URL (#15)
Also fix TeX-style quoting
2020-01-01 22:09:53 -05:00
byte[]
2e7937cbc3 ensure commission items are sorted by price 2020-01-01 21:36:06 -05:00
byte[]
0da19674d1 reenable async commenting 2020-01-01 12:27:20 -05:00
byte[]
7000be9865 add parameter recoder to api tag controller 2019-12-31 23:22:35 -05:00