1
0
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:
Braun Patrik 2016-05-03 14:40:14 +02:00
parent 51ca9ca7a5
commit eede484d29

View File

@ -8,12 +8,27 @@ DatabaseManager.getInstance((err)=>{
process.exit()
},()=>{
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();
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();
process.exit()
});