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:
parent
5474fe324f
commit
e5154576b4
5 changed files with 53 additions and 15 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue