mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 18:25:21 -04:00
Fix various ESLint errors in configs
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
616f963b8e
commit
208ff1d039
8 changed files with 25 additions and 19 deletions
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue