Disable reload on jwt.json creation (#4246)

This commit is contained in:
Alexandre BODIN 2019-10-14 10:49:19 +02:00 committed by GitHub
parent 2c994c43f6
commit 656343d059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,11 +15,13 @@ module.exports = async () => {
const jwtSecret = uuid();
_.set(strapi.plugins['users-permissions'], 'config.jwtSecret', jwtSecret);
strapi.reload.isWatching = false;
await strapi.fs.writePluginFile(
'users-permissions',
'config/jwt.json',
JSON.stringify({ jwtSecret }, null, 2)
);
strapi.reload.isWatching = true;
}
const pluginStore = strapi.store({