Explorar o código

fix:userId=>userid

sungongwei hai 7 meses
pai
achega
44744afd2b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      middleware/login.js

+ 2 - 2
middleware/login.js

@@ -6,8 +6,8 @@ module.exports = () => {
     const { userData, fuxiToken: token } = req.cookies;
     if (token) {
       const user = jwt.decode(token);
-      if (user.userId) {
-        req.uid = user.userId;
+      if (user.userid) {
+        req.uid = user.userid;
       }
       // req.role = user.role;
     }