diff --git a/lib/api/migrateToMongo/migrators/instance.js b/lib/api/migrateToMongo/migrators/instance.js index 734358a..7dd3013 100644 --- a/lib/api/migrateToMongo/migrators/instance.js +++ b/lib/api/migrateToMongo/migrators/instance.js @@ -34,14 +34,22 @@ module.exports = async (instanceName, options, progressBars, conn, connInstance) const collectionName = file.key || instanceName const collection = (!file.secondaryConnection ? conn : connInstance).collection(collectionName) - const data = JSON.parse(fs.readFileSync(file.path, 'utf8')) + var data; + try { + data = JSON.parse(fs.readFileSync(file.path, 'utf8')) + } catch (err) { + continue; + } + + if (Array.isArray(data)) continue data._id = file.path.split('\\').pop().split('.')[0] await collection.findOneAndUpdate({ _id: data._id }, { $set: data }, { upsert: true }) - progress.increment() } catch (err) { progress.stop() throw { err, file } + } finally { + progress.increment() } } } diff --git a/package.json b/package.json index e528797..fe1138b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "evolution-manager", "description": "Evolution Manager is an open-source interface for managing the Evolution API, simplifying the creation and administration of API instances with advanced features and diverse integrations.", - "version": "0.4.10", + "version": "0.4.11", "main": "dist", "engines": { "node": ">=16.0.0" diff --git a/src/components/global/EventsSelect.vue b/src/components/global/EventsSelect.vue new file mode 100644 index 0000000..5e41519 --- /dev/null +++ b/src/components/global/EventsSelect.vue @@ -0,0 +1,99 @@ + + + diff --git a/src/components/instance/settings/Rabbitmq.vue b/src/components/instance/settings/Rabbitmq.vue index 68a1552..0d479e0 100644 --- a/src/components/instance/settings/Rabbitmq.vue +++ b/src/components/instance/settings/Rabbitmq.vue @@ -31,18 +31,7 @@ - + @@ -65,16 +54,19 @@ variant="tonal" > {{ $t("save") }} - +