1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-31 16:39:37 +02:00

fix integrations

This commit is contained in:
François Darveau 2021-12-08 17:33:30 -05:00
parent e5154576b4
commit e7cd4d7705
21 changed files with 125 additions and 63 deletions

View file

@ -10,12 +10,11 @@ const { useKubernetes, useDocker } = require('./docker');
// @access Public
const getAllApps = asyncWrapper(async (req, res, next) => {
const {
useOrdering: orderType,
dockerApps: useDockerAPI,
kubernetesApps: useKubernetesAPI,
useOrdering: orderType
} = await loadConfig();
let apps = await loadIntegrationsApps();
// Load apps to create/update apps from integrations (Docker, Kubernetes, etc.)
await initIntegrationsApps();
// apps visibility
const where = req.isAuthenticated ? {} : { isPublic: true };
@ -44,26 +43,4 @@ const getAllApps = asyncWrapper(async (req, res, next) => {
});
});
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
}
module.exports = getAllApps;