- 在 userController 中添加了用户创建时的输入验证,包括 account 和 password 的长度限制 - 更新了 createUser 函数,使用 express-validator 进行参数验证 - 修正了 app.js 中的 authenticateSession 方法名 - 更新了 package.json 和 package-lock.json 中的 express-validator 版本
29 lines
614 B
JSON
29 lines
614 B
JSON
{
|
|
"name": "express",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"start": "node ./bin/www",
|
|
"nodemon": "nodemon ./bin/www"
|
|
},
|
|
"dependencies": {
|
|
"bcrypt": "^5.1.1",
|
|
"cookie-parser": "~1.4.4",
|
|
"cors": "^2.8.5",
|
|
"debug": "~2.6.9",
|
|
"dotenv": "^16.4.7",
|
|
"express": "^4.19.2",
|
|
"express-async-handler": "^1.2.0",
|
|
"express-session": "^1.18.0",
|
|
"express-validator": "^7.2.0",
|
|
"http-errors": "~1.6.3",
|
|
"jade": "^0.29.0",
|
|
"mongoose": "^8.3.4",
|
|
"morgan": "~1.9.1",
|
|
"nodemon": "^3.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"prettier": "^3.4.2"
|
|
}
|
|
}
|