1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-08-01 00:45:18 +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

@ -3,8 +3,9 @@ const axios = require('axios');
const Logger = require('../../../utils/Logger');
const logger = new Logger();
const loadConfig = require('../../../utils/loadConfig');
const Category = require('../../../models/Category');
dockerDefaultCategory = {
const dockerDefaultCategory = {
id: -2,
name: 'Docker',
type: 'apps',
@ -55,6 +56,17 @@ const useDocker = async (apps) => {
const dockerApps = [];
const categories = await Category.findAll({
where: {
type: 'apps'
},
order: [[orderType, 'ASC']]
});
if (!categories.find(category => category.id === dockerDefaultCategory.id)) {
categories.push(await Category.create(dockerDefaultCategory));
}
for (const container of containers) {
let labels = container.Labels;