Fix export issue when autoReload is enabled

pull/3/head
Boaz Poolman 2021-03-25 00:05:30 +01:00
parent 76d6260dc0
commit 2b20791a46
1 changed files with 11 additions and 3 deletions

View File

@ -15,11 +15,19 @@ module.exports = {
* @returns {void} * @returns {void}
*/ */
exportAll: async (ctx) => { exportAll: async (ctx) => {
await strapi.plugins['config-sync'].services.main.exportAllConfig(); if (strapi.config.get('autoReload')) {
ctx.send({ ctx.send({
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.` message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
}); });
}
await strapi.plugins['config-sync'].services.main.exportAllConfig();
if (!strapi.config.get('autoReload')) {
ctx.send({
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
});
}
}, },
/** /**