feat: add demo user and fix __dirname and fix cdn for panel upload
This commit is contained in:
@@ -190,5 +190,18 @@ export const initializeUser = async () => {
|
||||
console.info('new Users id', root.id, org.id);
|
||||
}
|
||||
};
|
||||
|
||||
export const CreateDemoUser = async () => {
|
||||
const w = await User.findAndCountAll({
|
||||
logging: false,
|
||||
});
|
||||
console.info('[User count]', w.count);
|
||||
const username = 'dmeo';
|
||||
const u = await User.findOne({ where: { username }, logging: false });
|
||||
if (!u) {
|
||||
const user = await User.createUser(username, '', 'demo');
|
||||
console.info('new Users name', user.username);
|
||||
} else {
|
||||
console.info('Users has been created', u.username);
|
||||
}
|
||||
};
|
||||
// initializeUser();
|
||||
|
||||
Reference in New Issue
Block a user