- 更新错误消息格式,使用驼峰命名法 - 添加服务器错误消息 - 用 logger 替代 console.log 记录日志 - 更新 MongoDB 连接日志 - 优化用户控制器中的错误处理 - 移除 SearchQuery 类中的无效代码 - 更新 package.json 中的脚本 - 移除未使用的 StringUtil 工具类 - 优化 hashUtils 中的密码加密和比较函数
23 lines
553 B
JavaScript
23 lines
553 B
JavaScript
// messages.js
|
|
module.exports = {
|
|
user: {
|
|
// 成功消息
|
|
created: 'user created',
|
|
updated: 'user updated',
|
|
deleted: 'user deleted',
|
|
login: 'login successful',
|
|
logout: 'logout successful',
|
|
|
|
// 错误消息
|
|
not_found: 'user not found',
|
|
alreadyExists: 'user already exists',
|
|
accountPasswordNotMatch: 'account and password not match',
|
|
accountNotMatch: 'account not match',
|
|
passwordNotMatch: 'password not match',
|
|
passwordIncorrect: 'password incorrect'
|
|
},
|
|
server: {
|
|
error: 'server error'
|
|
}
|
|
}
|