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
|
@ -227,7 +227,7 @@ const authSchema = Joi.object({
|
|||
.optional(),
|
||||
});
|
||||
|
||||
export default registerAs('authConfig', async () => {
|
||||
export default registerAs('authConfig', () => {
|
||||
// ToDo: Validate these with Joi to prevent duplicate entries?
|
||||
const gitlabNames = toArrayConfig(
|
||||
process.env.HD_AUTH_GITLABS,
|
||||
|
@ -367,7 +367,7 @@ export default registerAs('authConfig', async () => {
|
|||
},
|
||||
);
|
||||
if (authConfig.error) {
|
||||
const errorMessages = await authConfig.error.details
|
||||
const errorMessages = authConfig.error.details
|
||||
.map((detail) => detail.message)
|
||||
.map((error) => {
|
||||
error = replaceAuthErrorsWithEnvironmentVariables(
|
||||
|
@ -398,5 +398,5 @@ export default registerAs('authConfig', async () => {
|
|||
});
|
||||
throw new Error(buildErrorMessage(errorMessages));
|
||||
}
|
||||
return authConfig.value;
|
||||
return authConfig.value as AuthConfig;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue