Rename host -> url
Signed-off-by: Julio Zynger <julio.zynger@soundcloud.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
171be275ae
commit
7bb98ee655
@@ -31,5 +31,5 @@ The plugin requires to configure _at least one_ Periskop API location in the [ap
|
||||
periskop:
|
||||
instances:
|
||||
- name: <name of the instance>
|
||||
host: <HTTP/S host for the Periskop API instance>
|
||||
url: <HTTP/S url for the Periskop instance's API>
|
||||
```
|
||||
|
||||
Vendored
+1
-1
@@ -33,7 +33,7 @@ export interface Config {
|
||||
* The hostname of the given Periskop instance
|
||||
* @visibility frontend
|
||||
*/
|
||||
host: string;
|
||||
url: string;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user