diff options
Diffstat (limited to 'server/controllers/api/users.ts')
-rw-r--r-- | server/controllers/api/users.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts index ac7c87517..721b23301 100644 --- a/server/controllers/api/users.ts +++ b/server/controllers/api/users.ts | |||
@@ -43,7 +43,7 @@ usersRouter.get('/me/videos', | |||
43 | 43 | ||
44 | usersRouter.get('/me/videos/:videoId/rating', | 44 | usersRouter.get('/me/videos/:videoId/rating', |
45 | authenticate, | 45 | authenticate, |
46 | usersVideoRatingValidator, | 46 | asyncMiddleware(usersVideoRatingValidator), |
47 | asyncMiddleware(getUserVideoRating) | 47 | asyncMiddleware(getUserVideoRating) |
48 | ) | 48 | ) |
49 | 49 | ||
@@ -56,20 +56,20 @@ usersRouter.get('/', | |||
56 | ) | 56 | ) |
57 | 57 | ||
58 | usersRouter.get('/:id', | 58 | usersRouter.get('/:id', |
59 | usersGetValidator, | 59 | asyncMiddleware(usersGetValidator), |
60 | getUser | 60 | getUser |
61 | ) | 61 | ) |
62 | 62 | ||
63 | usersRouter.post('/', | 63 | usersRouter.post('/', |
64 | authenticate, | 64 | authenticate, |
65 | ensureUserHasRight(UserRight.MANAGE_USERS), | 65 | ensureUserHasRight(UserRight.MANAGE_USERS), |
66 | usersAddValidator, | 66 | asyncMiddleware(usersAddValidator), |
67 | createUserRetryWrapper | 67 | asyncMiddleware(createUserRetryWrapper) |
68 | ) | 68 | ) |
69 | 69 | ||
70 | usersRouter.post('/register', | 70 | usersRouter.post('/register', |
71 | ensureUserRegistrationAllowed, | 71 | asyncMiddleware(ensureUserRegistrationAllowed), |
72 | usersRegisterValidator, | 72 | asyncMiddleware(usersRegisterValidator), |
73 | asyncMiddleware(registerUserRetryWrapper) | 73 | asyncMiddleware(registerUserRetryWrapper) |
74 | ) | 74 | ) |
75 | 75 | ||
@@ -82,14 +82,14 @@ usersRouter.put('/me', | |||
82 | usersRouter.put('/:id', | 82 | usersRouter.put('/:id', |
83 | authenticate, | 83 | authenticate, |
84 | ensureUserHasRight(UserRight.MANAGE_USERS), | 84 | ensureUserHasRight(UserRight.MANAGE_USERS), |
85 | usersUpdateValidator, | 85 | asyncMiddleware(usersUpdateValidator), |
86 | asyncMiddleware(updateUser) | 86 | asyncMiddleware(updateUser) |
87 | ) | 87 | ) |
88 | 88 | ||
89 | usersRouter.delete('/:id', | 89 | usersRouter.delete('/:id', |
90 | authenticate, | 90 | authenticate, |
91 | ensureUserHasRight(UserRight.MANAGE_USERS), | 91 | ensureUserHasRight(UserRight.MANAGE_USERS), |
92 | usersRemoveValidator, | 92 | asyncMiddleware(usersRemoveValidator), |
93 | asyncMiddleware(removeUser) | 93 | asyncMiddleware(removeUser) |
94 | ) | 94 | ) |
95 | 95 | ||