mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-07 01:16:28 +02:00
chore: A few small cleanups - remove logging and restore default on dev server config
This commit is contained in:
parent
afb5a6139b
commit
f97f8b03bc
@ -133,19 +133,13 @@ class UserService {
|
|||||||
const user = await this.store.insert({
|
const user = await this.store.insert({
|
||||||
username: 'admin',
|
username: 'admin',
|
||||||
});
|
});
|
||||||
this.logger.info(`Did the thing"`);
|
|
||||||
const passwordHash = await bcrypt.hash(pwd, saltRounds);
|
const passwordHash = await bcrypt.hash(pwd, saltRounds);
|
||||||
this.logger.info(`Bcrypted that beast"`);
|
|
||||||
await this.store.setPasswordHash(user.id, passwordHash);
|
await this.store.setPasswordHash(user.id, passwordHash);
|
||||||
this.logger.info(`Set the hash"`);
|
|
||||||
await this.accessService.setUserRootRole(
|
await this.accessService.setUserRootRole(
|
||||||
user.id,
|
user.id,
|
||||||
RoleName.ADMIN,
|
RoleName.ADMIN,
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(`My error ${e}`);
|
|
||||||
console.log(e);
|
|
||||||
this.logger.error(e);
|
|
||||||
this.logger.error('Unable to create default user "admin"');
|
this.logger.error('Unable to create default user "admin"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ process.nextTick(async () => {
|
|||||||
password: 'passord',
|
password: 'passord',
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: 5432,
|
port: 5432,
|
||||||
database: 'unleash3',
|
database: 'unleash',
|
||||||
ssl: false,
|
ssl: false,
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
|
Loading…
Reference in New Issue
Block a user