File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
import configs from '../../../configs/project/server' ;
2
2
import Roles from '../../common/constants/Roles' ;
3
3
import bodyParser from '../middlewares/bodyParser' ;
4
+ import verifyRecaptcha from '../middlewares/verifyRecaptcha' ;
4
5
import authRequired from '../middlewares/authRequired' ;
5
6
import roleRequired from '../middlewares/roleRequired' ;
6
7
import fileUpload from '../middlewares/fileUpload' ;
@@ -16,7 +17,11 @@ export default ({ app }) => {
16
17
roleRequired ( [ Roles . ADMIN ] ) ,
17
18
userController . list
18
19
) ;
19
- app . post ( '/api/users' , bodyParser . json , userController . create ) ;
20
+ app . post ( '/api/users' ,
21
+ bodyParser . json ,
22
+ verifyRecaptcha ,
23
+ userController . create
24
+ ) ;
20
25
app . post ( '/api/users/login' , bodyParser . json , userController . login ) ;
21
26
app . get ( '/api/users/logout' , userController . logout ) ;
22
27
app . get ( '/api/users/me' , authRequired , userController . show ) ;
You can’t perform that action at this time.
0 commit comments