mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
bug fixing mongo init script
This commit is contained in:
parent
51ca9ca7a5
commit
eede484d29
@ -8,12 +8,27 @@ DatabaseManager.getInstance((err)=>{
|
|||||||
process.exit()
|
process.exit()
|
||||||
},()=>{
|
},()=>{
|
||||||
let userManager = new MongoUserManager();
|
let userManager = new MongoUserManager();
|
||||||
userManager.createUser(new User(0,"demo","demo@demo.hu","demo",UserRoles.Developer),(err)=>{
|
userManager.createUser(new User(0,"demo","demo",UserRoles.Developer),(err)=>{
|
||||||
DatabaseManager.getInstance().disconnect();
|
DatabaseManager.getInstance().disconnect();
|
||||||
process.exit()
|
process.exit()
|
||||||
});
|
});
|
||||||
|
|
||||||
userManager.createUser(new User(0,"admin","admin@admin.hu","admin",UserRoles.Developer),(err)=>{
|
userManager.createUser(new User(1,"developer","developer",UserRoles.Developer),(err)=>{
|
||||||
|
DatabaseManager.getInstance().disconnect();
|
||||||
|
process.exit()
|
||||||
|
});
|
||||||
|
|
||||||
|
userManager.createUser(new User(1,"admin","admin",UserRoles.Admin),(err)=>{
|
||||||
|
DatabaseManager.getInstance().disconnect();
|
||||||
|
process.exit()
|
||||||
|
});
|
||||||
|
|
||||||
|
userManager.createUser(new User(1,"user","user",UserRoles.User),(err)=>{
|
||||||
|
DatabaseManager.getInstance().disconnect();
|
||||||
|
process.exit()
|
||||||
|
});
|
||||||
|
|
||||||
|
userManager.createUser(new User(1,"guest","guest",UserRoles.Guest),(err)=>{
|
||||||
DatabaseManager.getInstance().disconnect();
|
DatabaseManager.getInstance().disconnect();
|
||||||
process.exit()
|
process.exit()
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user