added the ability to change user name

This commit is contained in:
Vladyslav Matsiiako
2023-07-18 18:36:34 -07:00
parent 3b5bc151ba
commit 8ad851d4b0
11 changed files with 140 additions and 12 deletions
+10
View File
@@ -29,6 +29,16 @@ router.patch(
usersController.updateMyMfaEnabled
);
router.patch(
"/me/name",
requireAuth({
acceptedAuthModes: [AUTH_MODE_JWT, AUTH_MODE_API_KEY],
}),
body("firstName").exists(),
validateRequest,
usersController.updateName
);
router.get(
"/me/organizations",
requireAuth({