fix: Code order in bootstrap function
parent
05f037cb64
commit
c71531eb5c
|
@ -16,13 +16,6 @@ const defaultTypes = require('./config/types');
|
|||
*/
|
||||
|
||||
module.exports = async () => {
|
||||
// Import on bootstrap.
|
||||
if (strapi.config.get('plugin.config-sync.importOnBootstrap')) {
|
||||
if (fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) {
|
||||
await strapi.plugin('config-sync').service('main').importAllConfig();
|
||||
}
|
||||
}
|
||||
|
||||
// Register config types.
|
||||
const registerTypes = () => {
|
||||
const types = {};
|
||||
|
@ -43,6 +36,13 @@ module.exports = async () => {
|
|||
};
|
||||
strapi.plugin('config-sync').types = registerTypes();
|
||||
|
||||
// Import on bootstrap.
|
||||
if (strapi.config.get('plugin.config-sync.importOnBootstrap')) {
|
||||
if (fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) {
|
||||
await strapi.plugin('config-sync').service('main').importAllConfig();
|
||||
}
|
||||
}
|
||||
|
||||
// Register permission actions.
|
||||
const actions = [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue