diff --git a/plugins/periskop-backend/src/api/index.ts b/plugins/periskop-backend/src/api/index.ts index ff0f1e8b5d..6245dcacfd 100644 --- a/plugins/periskop-backend/src/api/index.ts +++ b/plugins/periskop-backend/src/api/index.ts @@ -24,7 +24,7 @@ export type Options = { type PeriskopInstance = { name: string; - host: string; + url: string; }; export class PeriskopApi { @@ -35,14 +35,13 @@ export class PeriskopApi { .getConfigArray('periskop.instances') .flatMap(locConf => { const name = locConf.getString('name'); - const host = locConf.getString('host'); - return { name: name, host: host }; + const url = locConf.getString('url'); + return { name: name, url: url }; }); } private getApiUrl(instanceName: string): string | undefined { - return this.instances.find(instance => instance.name === instanceName) - ?.host; + return this.instances.find(instance => instance.name === instanceName)?.url; } async getErrors( diff --git a/plugins/periskop-backend/src/service/router.test.ts b/plugins/periskop-backend/src/service/router.test.ts index f071ab901f..687255c6e0 100644 --- a/plugins/periskop-backend/src/service/router.test.ts +++ b/plugins/periskop-backend/src/service/router.test.ts @@ -32,7 +32,7 @@ describe('createRouter', () => { instances: [ { name: 'db', - host: 'http://periskop-db', + url: 'http://periskop-db', }, ], }, diff --git a/plugins/periskop/README.md b/plugins/periskop/README.md index ad71529b70..0c19d5f570 100644 --- a/plugins/periskop/README.md +++ b/plugins/periskop/README.md @@ -31,5 +31,5 @@ The plugin requires to configure _at least one_ Periskop API location in the [ap periskop: instances: - name: - host: + url: ``` diff --git a/plugins/periskop/config.d.ts b/plugins/periskop/config.d.ts index 31ab363a15..dfb914cd4f 100644 --- a/plugins/periskop/config.d.ts +++ b/plugins/periskop/config.d.ts @@ -33,7 +33,7 @@ export interface Config { * The hostname of the given Periskop instance * @visibility frontend */ - host: string; + url: string; }>; }; } diff --git a/plugins/periskop/src/api/index.ts b/plugins/periskop/src/api/index.ts index c35de9bcd3..1258529698 100644 --- a/plugins/periskop/src/api/index.ts +++ b/plugins/periskop/src/api/index.ts @@ -24,7 +24,7 @@ type Options = { type PeriskopInstance = { name: string; - host: string; + url: string; }; /** @@ -42,14 +42,13 @@ export class PeriskopApi { .getConfigArray('periskop.instances') .flatMap(locConf => { const name = locConf.getString('name'); - const host = locConf.getString('host'); - return { name: name, host: host }; + const url = locConf.getString('url'); + return { name: name, url: url }; }); } private getApiUrl(instanceName: string): string | undefined { - return this.instances.find(instance => instance.name === instanceName) - ?.host; + return this.instances.find(instance => instance.name === instanceName)?.url; } getInstanceNames(): string[] {