Files
automatisch/packages/backend/src/helpers/app-info-converter.ts
2022-03-03 13:33:33 +03:00

13 lines
424 B
TypeScript

import type { IApp } from '@automatisch/types';
import appConfig from '../config/app';
const appInfoConverter = (rawAppData: string) => {
let computedRawData = rawAppData.replace('{BASE_URL}', appConfig.baseUrl);
computedRawData = computedRawData.replace('{WEB_APP_URL}', appConfig.webAppUrl);
const computedJSONData: IApp = JSON.parse(computedRawData)
return computedJSONData;
}
export default appInfoConverter;