diff --git a/ExpressAPI/src/config/Config.ts b/ExpressAPI/src/config/Config.ts index 54a1b2f1dfec1282febed47946d9b36d7126a560..f6923f33f4941c503a5dece4267f67eaae86a9ba 100644 --- a/ExpressAPI/src/config/Config.ts +++ b/ExpressAPI/src/config/Config.ts @@ -1,4 +1,4 @@ -import Toolbox from '../shared/Toolbox'; +import Toolbox from '../shared/helpers/Toolbox'; class Config { @@ -28,6 +28,10 @@ class Config { default: { description: string; initReadme: boolean; sharedRunnersEnabled: boolean; visibility: string; wikiEnabled: boolean; template: string }; }; + public exercice: { + maxSameName: number; default: { description: string; visibility: string; }; + }; + public readonly userPasswordLength: number; public readonly userPasswordSaltRounds: number; @@ -81,6 +85,14 @@ class Config { } }; + this.exercice = { + maxSameName: Number(process.env.EXERCICE_MAX_SAME_NAME), + default : { + description: process.env.EXERCICE_DEFAULT_DESCRIPTION, + visibility : process.env.EXERCICE_DEFAULT_VISIBILITY + } + }; + this.userPasswordLength = Number(process.env.USER_PASSWORD_LENGTH); this.userPasswordSaltRounds = Number(process.env.USER_PASSWORD_SALT_ROUNDS);