refactor(backend): 将ApiUser模型重命名为Admin并更新相关引用
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const { sequelize } = require('./models');
|
||||
const { ApiUser, Order } = require('./models');
|
||||
const { Admin, Order } = require('./models');
|
||||
const bcrypt = require('bcryptjs');
|
||||
|
||||
// 演示账号数据
|
||||
@@ -100,7 +100,7 @@ const initDatabase = async () => {
|
||||
const passwordHash = await bcrypt.hash(userData.password, salt);
|
||||
|
||||
try {
|
||||
await ApiUser.create({
|
||||
await Admin.create({
|
||||
...userData,
|
||||
password_hash: passwordHash
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user