chore: Use web app url as dynamic for info.json files
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
a5811d44ac
commit
d53ef4ffc6
@@ -11,7 +11,7 @@
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"readOnly": true,
|
||||
"value": "https://localhost:3001/app/discord/connections/add",
|
||||
"value": "{WEB_APP_URL}/app/discord/connections/add",
|
||||
"placeholder": null,
|
||||
"description": "When asked to input an OAuth callback or redirect URL in Discord OAuth, enter the URL above.",
|
||||
"docUrl": "https://automatisch.io/docs/discord#oauth-redirect-url",
|
||||
|
@@ -11,7 +11,7 @@
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"readOnly": true,
|
||||
"value": "https://localhost:3001/app/firebase/connections/add",
|
||||
"value": "{WEB_APP_URL}/app/firebase/connections/add",
|
||||
"placeholder": null,
|
||||
"description": "When asked to input an OAuth callback or redirect URL in Firebase OAuth, enter the URL above.",
|
||||
"docUrl": "https://automatisch.io/docs/firebase#oauth-redirect-url",
|
||||
|
@@ -11,7 +11,7 @@
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"readOnly": true,
|
||||
"value": "http://localhost:3001/app/flickr/connections/add",
|
||||
"value": "{WEB_APP_URL}/app/flickr/connections/add",
|
||||
"placeholder": null,
|
||||
"description": "When asked to input an OAuth callback or redirect URL in Flickr OAuth, enter the URL above.",
|
||||
"docUrl": "https://automatisch.io/docs/flickr#oauth-redirect-url",
|
||||
|
@@ -11,7 +11,7 @@
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"readOnly": true,
|
||||
"value": "https://localhost:3001/app/github/connections/add",
|
||||
"value": "{WEB_APP_URL}/app/github/connections/add",
|
||||
"placeholder": null,
|
||||
"description": "When asked to input an OAuth callback or redirect URL in Github OAuth, enter the URL above.",
|
||||
"docUrl": "https://automatisch.io/docs/github#oauth-redirect-url",
|
||||
|
@@ -11,7 +11,7 @@
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"readOnly": true,
|
||||
"value": "https://localhost:3001/app/twitch/connections/add",
|
||||
"value": "{WEB_APP_URL}/app/twitch/connections/add",
|
||||
"placeholder": null,
|
||||
"description": "When asked to input an OAuth callback or redirect URL in Twitch OAuth, enter the URL above.",
|
||||
"docUrl": "https://automatisch.io/docs/twitch#oauth-redirect-url",
|
||||
|
@@ -11,7 +11,7 @@
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"readOnly": true,
|
||||
"value": "https://localhost:3001/app/twitter/connections/add",
|
||||
"value": "{WEB_APP_URL}/app/twitter/connections/add",
|
||||
"placeholder": null,
|
||||
"description": "When asked to input an OAuth callback or redirect URL in Twitter OAuth, enter the URL above.",
|
||||
"docUrl": "https://automatisch.io/docs/twitter#oauth-redirect-url",
|
||||
|
@@ -11,7 +11,7 @@
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"readOnly": true,
|
||||
"value": "https://localhost:3001/app/typeform/connections/add",
|
||||
"value": "{WEB_APP_URL}/app/typeform/connections/add",
|
||||
"placeholder": null,
|
||||
"description": "When asked to input an OAuth callback or redirect URL in Typeform OAuth, enter the URL above.",
|
||||
"docUrl": "https://automatisch.io/docs/typeform#oauth-redirect-url",
|
||||
|
@@ -2,9 +2,10 @@ import AppInfoType from '../types/app-info';
|
||||
import appConfig from '../config/app';
|
||||
|
||||
const appInfoConverter = (rawAppData: string) => {
|
||||
const computedRawData = rawAppData.replace('{BASE_URL}', appConfig.baseUrl);
|
||||
const computedJSONData: AppInfoType = JSON.parse(computedRawData)
|
||||
let computedRawData = rawAppData.replace('{BASE_URL}', appConfig.baseUrl);
|
||||
computedRawData = rawAppData.replace('{WEB_APP_URL}', appConfig.webAppUrl);
|
||||
|
||||
const computedJSONData: AppInfoType = JSON.parse(computedRawData)
|
||||
return computedJSONData;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user