mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
feat: add functionality to register plugins via http
Also: - Add functionality for serving the responses from plugins - Add tests for related methods and routes Closes #2, #37
This commit is contained in:
committed by
Rainer Killinger
parent
59ea7a5ba6
commit
3d51ccfac2
@@ -174,7 +174,6 @@ export class Elasticsearch implements Database {
|
||||
constructor(private readonly config: SCConfigFile, mailQueue?: MailQueue) {
|
||||
|
||||
if (typeof config.internal.database === 'undefined'
|
||||
|| typeof config.internal.database.version === 'undefined'
|
||||
|| typeof config.internal.database.version !== 'string') {
|
||||
throw new Error('Database version is undefined. Check your config file');
|
||||
}
|
||||
@@ -182,14 +181,10 @@ export class Elasticsearch implements Database {
|
||||
const options: ES.ConfigOptions = {
|
||||
apiVersion: config.internal.database.version,
|
||||
host: Elasticsearch.getElasticsearchUrl(),
|
||||
log: 'error',
|
||||
// enable verbose logging for all request to elasticsearch
|
||||
log: process.env.ES_DEBUG === 'true' ? 'trace' : 'error',
|
||||
};
|
||||
|
||||
// enable verbose logging for all request to elasticsearch
|
||||
if (process.env.ES_DEBUG === 'true') {
|
||||
options.log = 'trace';
|
||||
}
|
||||
|
||||
this.client = new ES.Client(options);
|
||||
this.aliasMap = {};
|
||||
this.ready = false;
|
||||
|
||||
Reference in New Issue
Block a user