34 Commits (fdc41646d18e6e34c9258b632857529c19a50233)

Author SHA1 Message Date
Julian Lam fdc41646d1 feat: api v3 route to add email to user, optionally bypassing validation email, closes #11009 2 years ago
Julian Lam d05705183f refactor: move export generation logic to v3 controller, GET/HEAD routes for exports
re: #10384
3 years ago
Barış Soner Uşaklı be6bbabd0e feat: ability to mute users
new mute privilege
3 years ago
Julian Lam d098e26f82
User Email and email validation API (#10160)
* feat: wip user emails api

* fix: allow admins with manage-users access to email confirmation api as well

* fix: wrong route path

* docs: openapi spec
3 years ago
Julian Lam 0a41741b7e refactor: deprecate picture update socket call, new API routes for picture update 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
Julian Lam d2960aeb09 feat: added GET user route for api v3 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
Peter Jaszkowiak 23f212a4c0 chore: eslint prefer-destructuring 4 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
4 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 <[email protected]>
5 years ago
Julian Lam f300c933a5 refactor: move session revocation route to 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
Barış Soner Uşaklı bf480ee58b refactor: setupApiRoute signature 5 years ago
Julian Lam 8ecef7b891 refactor: middleware.assert.* 5 years ago
Julian Lam 2ec838fc59 feat(writeapi): token generation/delete routes, ACP updates 5 years ago
Julian Lam 8e7baac6ef fix(writeapi): calls to profile editing routes 200 even if user DNE 5 years ago
Julian Lam d044c3223e feat(writeapi): abstracted ajax calls out to new api module 5 years ago
Julian Lam dc666fd8a9 feat: added POST /api/v1/categories route 5 years ago
Julian Lam a5af2dc819 feat: added PUT/DELETE /api/v1/users/:uid/ban routes 5 years ago
Julian Lam db5c5b2cfb fix: follow route to match spec 5 years ago
Julian Lam b5bbcbaeaa feat: added POST and DELETE /api/v1/users/:uid/follow routes 5 years ago
Julian Lam 7aed174ebc feat: added PUT /api/v1/users/:uid/password route 5 years ago
Julian Lam a1ddc210b2 feat: added DELETE /api/v1/users/:uid and DELETE /api/v1/users 5 years ago
Julian Lam d15d9e4492 fix(refactor): patching helpers.tryRoute for API routes, some re-org
Thanks @barisusakli for the tip
5 years ago
Julian Lam d8879d21db fix: error handling with POST /api/v1/users 5 years ago
Julian Lam bba2a4638c fix: user creation POST route returns user data, updated openapi spec 5 years ago
Julian Lam 7b6d43bcc8 feat: added checkRequired middleware for API calls 5 years ago
Julian Lam f6433ef2c5 fix(refactor): merging write-api auth middlewares with core middlewares 5 years ago