fix: trailing slash integration url issues (#1571)

This commit is contained in:
Meier Lukas
2024-11-30 10:54:50 +01:00
committed by GitHub
parent d5f76218cd
commit b277f444b2
19 changed files with 126 additions and 129 deletions

View File

@@ -11,7 +11,7 @@ export class PlexIntegration extends Integration {
public async getCurrentSessionsAsync(): Promise<StreamSession[]> {
const token = super.getSecretValue("apiKey");
const response = await fetch(`${this.integration.url}/status/sessions`, {
const response = await fetch(this.url("/status/sessions"), {
headers: {
"X-Plex-Token": token,
},
@@ -66,7 +66,7 @@ export class PlexIntegration extends Integration {
await super.handleTestConnectionResponseAsync({
queryFunctionAsync: async () => {
return await fetch(this.integration.url, {
return await fetch(this.url("/"), {
headers: {
"X-Plex-Token": token,
},