Skip to content

Commit

Permalink
Merge branch 'main' into N21-2147-fix-auto-matching
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap authored Aug 23, 2024
2 parents 7ade13b + 7c42c84 commit 0036ad5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/server/src/modules/server/api/dto/config.response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ export class ConfigResponse {
@ApiProperty()
FEATURE_AI_TUTOR_ENABLED: boolean;

@ApiProperty()
FEATURE_ROOMS_ENABLED: boolean;

constructor(config: ServerConfig) {
this.ACCESSIBILITY_REPORT_EMAIL = config.ACCESSIBILITY_REPORT_EMAIL;
this.ADMIN_TABLES_DISPLAY_CONSENT_COLUMN = config.ADMIN_TABLES_DISPLAY_CONSENT_COLUMN;
Expand Down Expand Up @@ -289,5 +292,6 @@ export class ConfigResponse {
this.BOARD_COLLABORATION_URI = config.BOARD_COLLABORATION_URI;
this.FEATURE_SCHULCONNEX_MEDIA_LICENSE_ENABLED = config.FEATURE_SCHULCONNEX_MEDIA_LICENSE_ENABLED;
this.FEATURE_AI_TUTOR_ENABLED = config.FEATURE_AI_TUTOR_ENABLED;
this.FEATURE_ROOMS_ENABLED = config.FEATURE_ROOMS_ENABLED;
}
}
1 change: 1 addition & 0 deletions apps/server/src/modules/server/api/test/server.api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ describe('Server Controller (API)', () => {
'BOARD_COLLABORATION_URI',
'FEATURE_SCHULCONNEX_MEDIA_LICENSE_ENABLED',
'FEATURE_AI_TUTOR_ENABLED',
'FEATURE_ROOMS_ENABLED',
];

expect(response.status).toEqual(HttpStatus.OK);
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/modules/server/server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export interface ServerConfig
SCHULCONNEX_CLIENT__CLIENT_ID: string | undefined;
SCHULCONNEX_CLIENT__CLIENT_SECRET: string | undefined;
FEATURE_AI_TUTOR_ENABLED: boolean;
FEATURE_ROOMS_ENABLED: boolean;
}

const config: ServerConfig = {
Expand Down Expand Up @@ -288,6 +289,7 @@ const config: ServerConfig = {
) as boolean,
FEATURE_SANIS_GROUP_PROVISIONING_ENABLED: Configuration.get('FEATURE_SANIS_GROUP_PROVISIONING_ENABLED') as boolean,
FEATURE_AI_TUTOR_ENABLED: Configuration.get('FEATURE_AI_TUTOR_ENABLED') as boolean,
FEATURE_ROOMS_ENABLED: Configuration.get('FEATURE_ROOMS_ENABLED') as boolean,
};

export const serverConfig = () => config;
Expand Down
5 changes: 5 additions & 0 deletions config/default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,11 @@
"type": "boolean",
"default": false,
"description": "Enables the AI Tutor"
},
"FEATURE_ROOMS_ENABLED": {
"type": "boolean",
"default": "false",
"description": "Enables the rooms feature"
}
},
"required": []
Expand Down
3 changes: 2 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,6 @@
"ADMIN_API": {
"ALLOWED_API_KEYS": "thisisasupersecureapikeythatisabsolutelysave"
},
"TRAINING_URL": "https://lernen.dbildungscloud.de"
"TRAINING_URL": "https://lernen.dbildungscloud.de",
"FEATURE_ROOMS_ENABLED": true
}

0 comments on commit 0036ad5

Please sign in to comment.