mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -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
|
@ -18,7 +18,7 @@ const cspSchema = Joi.object({
|
|||
reportURI: Joi.string().optional().label('HD_CSP_REPORT_URI'),
|
||||
});
|
||||
|
||||
export default registerAs('cspConfig', async () => {
|
||||
export default registerAs('cspConfig', () => {
|
||||
const cspConfig = cspSchema.validate(
|
||||
{
|
||||
enable: process.env.HD_CSP_ENABLE || true,
|
||||
|
@ -30,10 +30,10 @@ export default registerAs('cspConfig', async () => {
|
|||
},
|
||||
);
|
||||
if (cspConfig.error) {
|
||||
const errorMessages = await cspConfig.error.details.map(
|
||||
const errorMessages = cspConfig.error.details.map(
|
||||
(detail) => detail.message,
|
||||
);
|
||||
throw new Error(buildErrorMessage(errorMessages));
|
||||
}
|
||||
return cspConfig.value;
|
||||
return cspConfig.value as CspConfig;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue