1
0
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:
sighphyre 2021-12-20 12:01:57 +02:00 committed by Ivar Conradi Østhus
parent afb5a6139b
commit f97f8b03bc
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09
2 changed files with 1 additions and 7 deletions

View File

@ -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"');
} }
} }

View File

@ -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: {