mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-23 01:27:14 +02:00
Also querying devs when creating def. admin user
This commit is contained in:
parent
67e5d6faaf
commit
2287893bf4
@ -125,7 +125,8 @@ export class SQLConnection {
|
||||
|
||||
// Add dummy Admin to the db
|
||||
const admins = await userRepository.findBy({role: UserRoles.Admin});
|
||||
if (admins.length === 0) {
|
||||
const devs = await userRepository.findBy({role: UserRoles.Developer});
|
||||
if (admins.length === 0 && devs.length === 0) {
|
||||
const a = new UserEntity();
|
||||
a.name = 'admin';
|
||||
a.password = PasswordHelper.cryptPassword('admin');
|
||||
|
Loading…
Reference in New Issue
Block a user