prevent error in case of invalid admin user setup
This commit is contained in:
parent
14d6493cec
commit
57e13b84df
@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
### Added
|
||||
### Changed
|
||||
### Fixed
|
||||
|
||||
- startup error with invalid create admin config
|
||||
|
||||
### Security
|
||||
|
||||
## [0.9.2]
|
||||
|
||||
@ -48,7 +48,11 @@ export class BootService implements OnApplicationBootstrap {
|
||||
})
|
||||
|
||||
user.set('roles', ['user', 'admin', 'superuser'])
|
||||
await user.save()
|
||||
try {
|
||||
await user.save()
|
||||
} catch (e) {
|
||||
this.logger.error('could not create admin user')
|
||||
}
|
||||
|
||||
this.logger.info('new root user created')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user