diff --git a/.gitignore b/.gitignore index 2e39eb5..31965e5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node_modules stats.json package-lock.json yarn.lock +files # Cruft .DS_Store diff --git a/controllers/config.js b/controllers/config.js index e5d212a..4a929c7 100644 --- a/controllers/config.js +++ b/controllers/config.js @@ -15,11 +15,19 @@ module.exports = { * @returns {void} */ exportAll: async (ctx) => { + if (strapi.config.get('autoReload')) { + ctx.send({ + message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.` + }); + } + await strapi.plugins['config-sync'].services.main.exportAllConfig(); - ctx.send({ - message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.` - }); + if (!strapi.config.get('autoReload')) { + ctx.send({ + message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.` + }); + } }, /** diff --git a/package.json b/package.json index 5bdb96d..8e3561f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "strapi-plugin-config-sync", - "version": "0.1.1", + "version": "0.1.2", "description": "Manage your Strapi database configuration as partial json files which can be imported/exported across environments. ", "strapi": { "name": "config-sync",