Commit Graph

29 Commits

Author SHA1 Message Date
Julian Lam
7223074f1d feat: ability to re-order topic thumbnails 2021-02-16 11:54:09 -05:00
Julian Lam
3e6640efb2 refactor: thumbs.associate accepts both relative path and url in path arg 2021-02-12 17:11:32 -05:00
Peter Jaszkowiak
cc9d6fd08b chore: eslint max-len 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
Julian Lam
dc84559d0b feat(topic-events): topic events GET route in write API 2021-01-27 13:16:49 -05:00
Julian Lam
f5fcd232f6 fix: regression caused by 77ab46686d
Access checks were added for topic GET route, but occasionally a post_uuid is passed in, which is available to everyone, and so checks should be skipped
2021-01-17 15:43:29 -05:00
Julian Lam
77ab46686d fix: access checks for tags and thumbs get route 2021-01-12 17:38:35 -05:00
Julian Lam
edb8da1ef9 feat(api): closes #9123 category and topic routes migrated to Write API 2020-12-29 10:32:01 -05:00
Julian Lam
bd5c4a5cff fix: tests 2020-12-09 16:46:19 -05:00
Julian Lam
3e54b70c06 fix: #9092, Topic thumbnails do not work with third-party uploaders 2020-12-09 15:47:58 -05:00
Julian Lam
c043cfebd6 fix: added back missing topic thumb tests that were removed in last commit 2020-12-09 10:42:41 -05:00
Julian Lam
340387c18a fix: #9055, non-standard API response from addThumbs route
Also removed old thumb upload router handler, and updated uploadPost handling in composer to match new response schema
2020-12-09 10:42:41 -05:00
Julian Lam
4152aa552e feat: tests for topic thumbs
Also added some error checking to addThumbs controller
2020-12-09 10:42:41 -05:00
Julian Lam
ef7d6db912 feat: server-side work for #9047
- rename Thumbs.commit to Thumbs.migrate
- new PUT method that calls Thumbs.migrate
- `checkThumbPrivileges` now takes a single object parameter (ins. of req/res)
2020-12-09 10:42:41 -05:00
Julian Lam
b5d910f53b feat: core work for #9042, thumb deletion now accepts uuids
+ common data validation for thumb addition and deletion
2020-12-09 10:42:41 -05:00
Julian Lam
90497e3ef5 feat: more work on topic thumbs refactor
- addThumb and deleteThumb are now protected routes (duh)
- new getThumbs route GET /api/v3/topics/<tid>/thumbs
- Updated `assert.path` middleware to better handle if relative paths are received with upload_url
- Slight refactor of thumbs lib to use validator to differentiate between tid and UUID
2020-12-09 10:42:41 -05:00
Julian Lam
708b1c338f fix: #9040 2020-12-09 10:42:41 -05:00
Julian Lam
7e9e08f718 feat: server-side routes for handling multiple topic thumbnails
closes #8994, requires 'topic-thumb-refactor' branch of composer-default
2020-12-09 10:42:41 -05:00
Barış Soner Uşaklı
954dc5b7be feat: #8983, update pin tooltip in topic 2020-12-01 16:25:13 -05:00
Julian Lam
046d0b1637 feat: allow pins to expire (if set) (#8908)
* fix: add back topic assert middleware for pin route

* feat: server-side handling of pin expiries

* refactor: togglePin to not require uid parameter [breaking]

* feat: automatic unpinning if pin has expiration set

* feat: client-side modal for setting pin expiration

* refactor: categories.getPinnedTids to accept multiple cids

... in preparation for pin expiry logic, direct access to *:pinned zsets is discouraged

* fix: remove references to since-removed jobs file for topics

* feat: expire pins when getPinnedTids is called

* refactor: make the togglePin change non-breaking

The 'action:topic.pin' hook now sends uid again, as before. However, if it is a system action (that is, a pin that expired), 'system' will be sent in instead of a valid uid
2020-11-20 11:31:14 -05:00
Barış Soner Uşaklı
e78c498e84 fix: missing doTopicAction, fix wrong api params 2020-10-16 21:36:59 -04:00
Julian Lam
9ee3cb9b62 refactor: topic follow/ignore to use api lib 2020-10-16 12:30:14 -04:00
Julian Lam
68d6818bca refactor: topic tools' actions to use api lib 2020-10-16 12:02:51 -04:00
Julian Lam
21974a77f8 feat: topic reply to use api lib (also + missing file) 2020-10-16 11:01:18 -04:00
Julian Lam
40598b368e refactor: topic creation to use api lib 2020-10-16 11:01:18 -04:00
Julian Lam
1605e5e443 feat(writeapi): topic tags 2020-10-08 15:33:10 -04:00
Julian Lam
9be5629458 feat(writeapi): topic follow/ignore 2020-10-08 15:33:10 -04:00
Julian Lam
da25ce4d09 feat: topic delete/restore/purge/(un)pin/(un)lock 2020-10-08 15:33:10 -04:00
Julian Lam
6096f74ab2 feat(writeapi): adding missing files 2020-10-08 15:33:10 -04:00