94 Commits (57e54d559beece183cbce3b6cc7c7657d0ea17ad)

Author SHA1 Message Date
gasoved 3df79683f5
feat: create folders in ACP uploads #9638 (#9750)
* feat: create folders in ACP uploads #9638

* fix: openapi

* test: missing tests

* fix: eslint

* fix: tests
4 years ago
Barış Soner Uşaklı c354cde347 fix: #9719, only apply to non https 4 years ago
Barış Soner Uşaklı 358ad74054 feat: closes #9684, allow event deletion
fix: topic events appearing before necro messages
feat: add move topic event
feat: add ability to delete specific topic events via events.purge
4 years ago
Julian Lam cc6cbfcdc4
Flags API (#9666)
* feat: new routes for flags API

+ flag get
+ flag creation, migration from socket method
+ flag update, migration from socket method
* fixed bug where you could not unassign someone from a flag

* feat: tests for new flags API

added missing files for schema update

* fix: flag tests to use Write API instead of sockets

* feat: flag notes API + tests

* chore: remove debug line

* test: fix breaking test on mongo
4 years ago
Barış Soner Uşaklı 286644d0b8 fix: #9592, check session 4 years ago
Julian Lam d2960aeb09 feat: added GET user route for api v3 4 years ago
Barış Soner Uşaklı 2ea468daa3 test: clear cache between runs, require middleware later in helpers 4 years ago
psychobunny a9978fcfd2 feat: rate limit file uploads 4 years ago
Julian Lam 9c52fd2e74 fix: #9450 express session saved even if saveUninitialized explicitly passed in 4 years ago
Julian Lam 7da061f0d7
refactor: automatically authenticate all requests setup through route helpers (#9357)
* refactor: automatically authenticate all requests setup through route helpers

* fix: removed connect-ensure-login dependency

* fix: bug with some middlewares not defined outside route helper methods
4 years ago
Julian Lam c1b3079d93 feat: category privilege API routes
closes #9342
4 years ago
Julian Lam f561799f74 refactor: abstract out some client side dashboard code into modules, analytics subpages for users, topics, and logins 4 years ago
Julian Lam 7223074f1d feat: ability to re-order topic thumbnails 4 years ago
Peter Jaszkowiak cc9d6fd08b chore: eslint max-len 4 years ago
Peter Jaszkowiak 23f212a4c0 chore: eslint prefer-destructuring 4 years ago
Peter Jaszkowiak dab3b23575 chore: eslint no-var, vars-on-top 4 years ago
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback 4 years ago
gasoved eb642f40b9 feat: #9109, ability to delete a post's diffs 4 years ago
Barış Soner Uşaklı 647d3ba810 fix: removed methods 4 years ago
Julian Lam dc84559d0b feat(topic-events): topic events GET route in write API 4 years ago
Julian Lam 966c4117ec refactor(api): post move to write API 4 years ago
Julian Lam e118e59ce0 refactor(api): post diffs to use write API 4 years ago
Julian Lam 77ab46686d fix: access checks for tags and thumbs get route 4 years ago
Julian Lam 56f929ed4f feat: add write API route for checking login credentials 4 years ago
Julian Lam edb8da1ef9 feat(api): closes #9123 category and topic routes migrated to Write API 4 years ago
Julian Lam e267f29584 feat(api): #9123, migrate /api/post/pid/:pid to Write API 4 years ago
Julian Lam 32e36f7b2e feat(api): group ownership API route, switch client-side to use API route 4 years ago
Julian Lam 1cd2689cf6 refactor(api): deprecated groups update socket in favour of API lib 4 years ago
Julian Lam 878ee06715 refactor: schema backreference test to use map instead of reduce, properly check write-api routes 4 years ago
Julian Lam 3e54b70c06 fix: #9092, Topic thumbnails do not work with third-party uploaders 4 years ago
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)
4 years ago
Julian Lam b5d910f53b feat: core work for #9042, thumb deletion now accepts uuids
+ common data validation for thumb addition and deletion
4 years ago
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
4 years ago
Julian Lam 708b1c338f fix: #9040 4 years ago
Julian Lam 7e9e08f718 feat: server-side routes for handling multiple topic thumbnails
closes #8994, requires 'topic-thumb-refactor' branch of composer-default
4 years ago
Barış Soner Uşaklı 3cd0c9a476 fix: #8998, allow guests to use write api to post/reply 4 years ago
Julian Lam ac734b8335 fix: #8912 4 years ago
Julian Lam 6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 5 years ago
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
5 years ago
Julian Lam a0b7a82350
feat(api): account deletion routes for the Write API (#8881)
* feat(api): account deletion routes for the Write API

* refactor: rewrite client-side calls to account deletion to use api

* style: apply DRY
5 years ago
gasoved 3ccebf112e
feat: invites regardless of registration type, invite privilege, groups to join on acceptance (#8786)
* feat: allow invites in normal registration mode + invite privilege

* feat: select groups to join from an invite

* test: check if groups from invitations have been joined

* fix: remove unused variable

* feat: write API versions of socket calls

* docs: openapi specs for the new routes

* test: iron out mongo redis difference

* refactor: move inviteGroups endpoint into write API

* refactor: use GET /api/v3/users/:uid/invites/groups

Instead of GET /api/v3/users/:uid/inviteGroups

* fix: no need for /api/v3 prefix when using api module

* fix: tests

* refactor: change POST /api/v3/users/invite

To POST /api/v3/users/:uid/invites

* refactor: make helpers.invite awaitable

* fix: restrict invite API to self-use only

* fix: move invite groups controller to write api, +tests

* fix: tests

Co-authored-by: Julian Lam <julian@nodebb.org>
5 years ago
Julian Lam bcccb331db docs: openapi schema for user/group exist check, session deletion 5 years ago
Julian Lam f300c933a5 refactor: move session revocation route to write api 5 years ago
Julian Lam d263192271 feat: group exists API call in write api 5 years ago
Julian Lam f2bb42c076 fix: user exist route needs no authentication 5 years ago
Julian Lam 60e1e99b4f feat: new shorthand route /api/v3/users/bySlug/:userslug
closes #8844
5 years ago
Julian Lam 266d7587b2 refactor: remove usage of middlewares
Specifically, middleware.isAdmin|exposePrivilegeSet|exposePrivileges
5 years ago
Julian Lam aa8faf58a0 refactor: remove /users/{uid}/settings/{setting} route
@baris Also, I am now allowing the following properties to be saved in User.saveSettings:
- categoryTopicSort
- topicPostSort
- setCategorySort
- setTopicSort
5 years ago
Julian Lam b156b8b573 feat: wip, write api tests framework
re-using read api tests if possible
5 years ago
Julian Lam c26f2b6599 feat(writeapi): user settings API 5 years ago