mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-01 07:38:33 -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
|
@ -28,7 +28,7 @@ const hstsSchema = Joi.object({
|
|||
preload: Joi.boolean().default(true).optional().label('HD_HSTS_PRELOAD'),
|
||||
});
|
||||
|
||||
export default registerAs('hstsConfig', async () => {
|
||||
export default registerAs('hstsConfig', () => {
|
||||
const hstsConfig = hstsSchema.validate(
|
||||
{
|
||||
enable: process.env.HD_HSTS_ENABLE,
|
||||
|
@ -42,10 +42,10 @@ export default registerAs('hstsConfig', async () => {
|
|||
},
|
||||
);
|
||||
if (hstsConfig.error) {
|
||||
const errorMessages = await hstsConfig.error.details.map(
|
||||
const errorMessages = hstsConfig.error.details.map(
|
||||
(detail) => detail.message,
|
||||
);
|
||||
throw new Error(buildErrorMessage(errorMessages));
|
||||
}
|
||||
return hstsConfig.value;
|
||||
return hstsConfig.value as HstsConfig;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue