Authored by TaoHuang

fix login

... ... @@ -4,13 +4,6 @@ function submit(req, res, next) {
const { alipayAccount, alipayName } = req.body;
const uid = req.user.uid;
// if (!uid) {
// return res.json({
// code: 401,
// message: '抱歉,您暂未登录!'
// });
// }
if (!alipayAccount || !alipayName) {
return res.json({
code: 404,
... ...
... ... @@ -11,6 +11,6 @@ const router = require('express').Router(); // eslint-disable-line
const alipayController = require('./middleware/alipay.controller');
const auth = require('./middleware/auth');
router.post('/submit', alipayController.submit);
router.post('/submit', auth, alipayController.submit);
module.exports = router;
... ...