Install strapi connector on create/update database

This commit is contained in:
Jim Laurie 2017-07-28 16:56:17 +02:00
parent 686c9aeb47
commit 51a2cfa232
2 changed files with 3 additions and 1 deletions

View File

@ -215,6 +215,8 @@ module.exports = {
strapi.reload.isWatching = false; strapi.reload.isWatching = false;
Service.installDependency(params, newName);
const updateErrors = Service.updateSettings(params, items, env); const updateErrors = Service.updateSettings(params, items, env);
!_.isEmpty(updateErrors) ? ctx.badData(null, Service.formatErrors(updateErrors)) : ctx.send({ ok: true }); !_.isEmpty(updateErrors) ? ctx.badData(null, Service.formatErrors(updateErrors)) : ctx.send({ ok: true });

View File

@ -710,6 +710,6 @@ module.exports = {
const module = _.get(params, `databases.connections.${name}.connector`); const module = _.get(params, `databases.connections.${name}.connector`);
const installed = _.indexOf(_.keys(strapi.config.dependencies), module) !== -1; const installed = _.indexOf(_.keys(strapi.config.dependencies), module) !== -1;
// if (!installed) exec(`npm install ${module} --save`); if (!installed) exec(`npm install ${module} --save`);
} }
}; };