Fix various ESLint errors in configs

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-02-24 20:29:39 +01:00
parent 616f963b8e
commit 208ff1d039
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
8 changed files with 25 additions and 19 deletions

View file

@ -55,7 +55,7 @@ const databaseSchema = Joi.object({
.label('HD_DATABASE_DIALECT'),
});
export default registerAs('databaseConfig', async () => {
export default registerAs('databaseConfig', () => {
const databaseConfig = databaseSchema.validate(
{
username: process.env.HD_DATABASE_USER,
@ -72,10 +72,10 @@ export default registerAs('databaseConfig', async () => {
},
);
if (databaseConfig.error) {
const errorMessages = await databaseConfig.error.details.map(
const errorMessages = databaseConfig.error.details.map(
(detail) => detail.message,
);
throw new Error(buildErrorMessage(errorMessages));
}
return databaseConfig.value;
return databaseConfig.value as DatabaseConfig;
});