Showing
2 changed files
with
1 additions
and
8 deletions
@@ -4,13 +4,6 @@ function submit(req, res, next) { | @@ -4,13 +4,6 @@ function submit(req, res, next) { | ||
4 | const { alipayAccount, alipayName } = req.body; | 4 | const { alipayAccount, alipayName } = req.body; |
5 | const uid = req.user.uid; | 5 | const uid = req.user.uid; |
6 | 6 | ||
7 | - // if (!uid) { | ||
8 | - // return res.json({ | ||
9 | - // code: 401, | ||
10 | - // message: '抱歉,您暂未登录!' | ||
11 | - // }); | ||
12 | - // } | ||
13 | - | ||
14 | if (!alipayAccount || !alipayName) { | 7 | if (!alipayAccount || !alipayName) { |
15 | return res.json({ | 8 | return res.json({ |
16 | code: 404, | 9 | code: 404, |
@@ -11,6 +11,6 @@ const router = require('express').Router(); // eslint-disable-line | @@ -11,6 +11,6 @@ const router = require('express').Router(); // eslint-disable-line | ||
11 | const alipayController = require('./middleware/alipay.controller'); | 11 | const alipayController = require('./middleware/alipay.controller'); |
12 | const auth = require('./middleware/auth'); | 12 | const auth = require('./middleware/auth'); |
13 | 13 | ||
14 | -router.post('/submit', alipayController.submit); | 14 | +router.post('/submit', auth, alipayController.submit); |
15 | 15 | ||
16 | module.exports = router; | 16 | module.exports = router; |
-
Please register or login to post a comment