feat: Wait for importAllConfig to finish
parent
821a6a02bf
commit
05433c9c8c
|
@ -149,7 +149,7 @@ module.exports = {
|
||||||
|
|
||||||
const diff = difference(databaseConfig, fileConfig);
|
const diff = difference(databaseConfig, fileConfig);
|
||||||
|
|
||||||
Object.keys(diff).map((file) => {
|
await Promise.all(Object.keys(diff).map(async (file) => {
|
||||||
const type = file.split('.')[0]; // Grab the first part of the filename.
|
const type = file.split('.')[0]; // Grab the first part of the filename.
|
||||||
const name = file.split(/\.(.+)/)[1]; // Grab the rest of the filename minus the file extension.
|
const name = file.split(/\.(.+)/)[1]; // Grab the rest of the filename minus the file extension.
|
||||||
|
|
||||||
|
@ -157,8 +157,8 @@ module.exports = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strapi.plugins['config-sync'].services.main.importSingleConfig(type, name);
|
await strapi.plugins['config-sync'].services.main.importSingleConfig(type, name);
|
||||||
});
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue