From 2b20791a469b2562d3a1b914c966b522336deed6 Mon Sep 17 00:00:00 2001 From: Boaz Poolman Date: Thu, 25 Mar 2021 00:05:30 +0100 Subject: [PATCH] Fix export issue when autoReload is enabled --- controllers/config.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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}.` + }); + } }, /**