Initial commit: 宁夏智慧养殖监管平台
This commit is contained in:
14
backend/check_users.js
Normal file
14
backend/check_users.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const { User } = require('./models');
|
||||
|
||||
User.findAll({ attributes: ['username', 'email'] })
|
||||
.then(users => {
|
||||
console.log('数据库中的用户:');
|
||||
users.forEach(user => {
|
||||
console.log(`用户名: ${user.username}, 邮箱: ${user.email}`);
|
||||
});
|
||||
process.exit(0);
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('查询失败:', err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user