chore: Wait for importAllConfig to finish

pull/25/head
Boaz Poolman 2021-10-22 13:56:58 +02:00
parent c9dd10762f
commit 2477bdd345
1 changed files with 3 additions and 3 deletions

View File

@ -152,7 +152,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.
@ -160,8 +160,8 @@ module.exports = () => ({
return; return;
} }
strapi.plugin('config-sync').service('main').importSingleConfig(type, name); await strapi.plugin('config-sync').service('main').importSingleConfig(type, name);
}); }));
}, },
/** /**