parent
5e0ccf8e3d
commit
d9198099a7
|
@ -86,7 +86,7 @@ export default {
|
||||||
|
|
||||||
zipConfig: async (ctx) => {
|
zipConfig: async (ctx) => {
|
||||||
// Check for existance of the config file sync dir.
|
// Check for existance of the config file sync dir.
|
||||||
if (!fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) {
|
if (!fs.existsSync(strapi.config.get('plugin::config-sync.syncDir'))) {
|
||||||
ctx.send({
|
ctx.send({
|
||||||
message: 'No config files were found.',
|
message: 'No config files were found.',
|
||||||
});
|
});
|
||||||
|
|
|
@ -77,7 +77,7 @@ export default () => ({
|
||||||
const fileName = `config-sync-${new Date().toJSON()}.zip`;
|
const fileName = `config-sync-${new Date().toJSON()}.zip`;
|
||||||
|
|
||||||
const zip = new AdmZip();
|
const zip = new AdmZip();
|
||||||
zip.addLocalFolder(strapi.config.get('plugin.config-sync.syncDir'));
|
zip.addLocalFolder(strapi.config.get('plugin::config-sync.syncDir'));
|
||||||
const base64Data = zip.toBuffer().toString('base64');
|
const base64Data = zip.toBuffer().toString('base64');
|
||||||
|
|
||||||
return { base64Data, name: fileName, message: 'Success' };
|
return { base64Data, name: fileName, message: 'Success' };
|
||||||
|
|
Loading…
Reference in New Issue