Merge pull request #23 from boazpoolman/feature/fix-import-on-bootstrap

feat: Wait for importAllConfig to finish
pull/31/head
Boaz Poolman 2021-10-22 13:53:07 +02:00 committed by GitHub
commit 17b4be7f7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}); }));
}, },
/** /**