1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-08-02 09:25:17 +02:00

attempt to fix integrations

This commit is contained in:
François Darveau 2021-12-07 23:23:57 -05:00
parent 5474fe324f
commit e5154576b4
5 changed files with 53 additions and 15 deletions

View file

@ -15,15 +15,7 @@ const getAllApps = asyncWrapper(async (req, res, next) => {
kubernetesApps: useKubernetesAPI,
} = await loadConfig();
let apps;
if (useDockerAPI) {
await useDocker(apps);
}
if (useKubernetesAPI) {
await useKubernetes(apps);
}
let apps = await loadIntegrationsApps();
// apps visibility
const where = req.isAuthenticated ? {} : { isPublic: true };
@ -52,4 +44,26 @@ const getAllApps = asyncWrapper(async (req, res, next) => {
});
});
module.exports = getAllApps;
const loadIntegrationsApps = asyncWrapper(async () => {
const {
dockerApps: useDockerAPI,
kubernetesApps: useKubernetesAPI,
} = await loadConfig();
let apps;
if (useDockerAPI) {
await useDocker(apps);
}
if (useKubernetesAPI) {
await useKubernetes(apps);
}
return apps;
});
module.exports = {
getAllApps,
loadIntegrationsApps
}