From e1ae7c603d6196aac234941cb77cdaca46c48bdd Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 9 Dec 2021 10:02:47 +0000 Subject: [PATCH] Adding placeholder and making sure query urls have a protocol. --- .../[selectedDatasource]/rest/[query]/index.svelte | 2 +- packages/server/src/integrations/rest.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte index bafca7bc42..3c611459c1 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte @@ -176,7 +176,7 @@ />
- +
diff --git a/packages/server/src/integrations/rest.ts b/packages/server/src/integrations/rest.ts index 696671a6fb..35230cba4a 100644 --- a/packages/server/src/integrations/rest.ts +++ b/packages/server/src/integrations/rest.ts @@ -146,11 +146,11 @@ module RestModule { getUrl(path: string, queryString: string): string { const main = `${path}?${queryString}` - if (!this.config.url) { - return main - } else { - return `${this.config.url}/${main}` + let complete = !this.config.url ? main : `${this.config.url}/${main}` + if (!complete.startsWith("http")) { + complete = `http://${complete}` } + return complete } async _req(query: RestQuery) {