2022-12-11 19:16:31 +01:00
|
|
|
import { ConfigType } from '../../types/config';
|
|
|
|
|
import { getConfig } from './getConfig';
|
|
|
|
|
|
|
|
|
|
export const getFrontendConfig = (name: string): ConfigType => {
|
|
|
|
|
const config = getConfig(name);
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
...config,
|
2022-12-23 17:17:57 +01:00
|
|
|
apps: config.apps.map((app) => ({
|
|
|
|
|
...app,
|
|
|
|
|
integration: {
|
|
|
|
|
...app.integration ?? null,
|
|
|
|
|
type: app.integration?.type ?? null,
|
|
|
|
|
properties: app.integration?.properties.map((property) => ({
|
|
|
|
|
...property,
|
|
|
|
|
value: property.type === 'private' ? undefined : property.value,
|
|
|
|
|
isDefined: property.value != null,
|
|
|
|
|
})) ?? [],
|
|
|
|
|
},
|
2022-12-11 19:16:31 +01:00
|
|
|
})),
|
|
|
|
|
};
|
|
|
|
|
};
|