Skip to content

Commit

Permalink
Merge pull request #11 from DISIC/dev
Browse files Browse the repository at this point in the history
fix(pencil): modifying config schema vlidation
  • Loading branch information
youssefElMkhantar authored Apr 8, 2024
2 parents 7d68d6b + daec729 commit c539847
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions src/config.schema.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
import * as joi from 'joi';

export const configValidationSchema = joi.object({
MONGO_URI: joi.string().uri().required(),
JMMC_URL: joi.string().uri().required(),
COOKIE_SECRET: joi.string().required(),
AGENTCONNECT_ACJWT_AUD: joi.string().required(),
AGENTCONNECT_ACJWT_ISS: joi.string().required(),
AGENTCONNECT_ACJWT_SECRET: joi.string().required(),
AGENTCONNECT_ACJWT_SUB: joi.string().required(),
//agentConnect
AGENTCONNECT_CLIENTID: joi.string().required(),
AGENTCONNECT_EXPIRESAFTER: joi.number().required().default(10),
AGENTCONNECT_EXPIRESAFTER: joi.number().default(10),
AGENTCONNECT_PROXYURL: joi.string().uri().required(),
AGENTCONNECT_REDIRECT_URL: joi.string().uri().required(),
AGENTCONNECT_SCOPE: joi.string().required().default('openid email'),
AGENTCONNECT_SECRET: joi.string().required(),
AGENTCONNECT_URL: joi.string().uri().required(),
//config
CONFIG_FILE: joi
.string()
.required()
.default('/home/hkhait/webconf_config.json'),
//Email
EMAIL_CONFERENCETOKENLENGTH: joi.number().required(),
EMAIL_FROM: joi.string().required(),
// EMAIL_SMTP_AUTH_PASS: joi.string().allow(null).optional(),
Expand All @@ -30,21 +28,20 @@ export const configValidationSchema = joi.object({
EMAIL_SMTP_TLS_REJECTUNAUTHORIZED: joi.boolean().required(),
EMAIL_SUBJECT: joi.string().required(),
EMAIL_TOKENEXPIRATIONINHOURS: joi.number().required(),
ENV: joi.string().required(),
FRONTCONF_CONFERENCEENDSAFTER: joi.number().required(),
//frontconf
FRONTCONF_ROOMNAMECONSTRAINT_LENGTH: joi.number().required(),
FRONTCONF_ROOMNAMECONSTRAINT_MINNUMBEROFDIGITS: joi.number().required(),
FRONTCONF_TITLE: joi.string().required(),
JITSI_APPPATH: joi.string().required(),
//jitsi
JITSI_JITSIJWT_AUD: joi.string().required(),
JITSI_JITSIJWT_EXPIRESAFTER: joi.number().required(),
JITSI_JITSIJWT_ISS: joi.string().required(),
JITSI_JITSIJWT_SECRET: joi.string().required(),
JITSI_JITSIJWT_SUB: joi.string().required(),
LOG_TO_CONSOLE_ONLY: joi.boolean().required(),
LOGFILE: joi.string().required(),
MONGODB_USENEWURLPARSER: joi.boolean().required(),
MONGODB_USEUNIFIEDTOPOLOGY: joi.boolean().required(),
//mongodb
MONGO_URI: joi.string().required(),
MONGODB_USENEWURLPARSER: joi.boolean(),
MONGODB_USEUNIFIEDTOPOLOGY: joi.boolean(),
//prosody
PROSODY_AVAILABLE_INSTANCES: joi.string().required(),
PROSODY_DOMAIN: joi.string().required(),
REACT_APP_BASEURL: joi.string().required(),
Expand Down

0 comments on commit c539847

Please sign in to comment.