mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
Clean guidelines
This commit is contained in:
parent
f233466e01
commit
92a4cea98c
@ -245,7 +245,7 @@ module.exports = function (strapi) {
|
||||
socket.on('err', function (data) {
|
||||
strapi.log.warn(data.text);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
cb();
|
||||
} else {
|
||||
@ -268,26 +268,23 @@ module.exports = function (strapi) {
|
||||
|
||||
config = JSON.parse(config);
|
||||
strapi.token = config.token;
|
||||
|
||||
|
||||
socket.emit('getPublicKey', null, function (publicKey) {
|
||||
if (publicKey) {
|
||||
if (publicKey && strapi.config.environment === 'development') {
|
||||
const key = new RSA();
|
||||
let object;
|
||||
key.importKey(publicKey, 'public');
|
||||
|
||||
if (strapi.config.environment === 'development') {
|
||||
object = {
|
||||
appId: strapi.config.studio.appId,
|
||||
appName: strapi.config.name,
|
||||
publicKey: strapi.rsa.exportKey('private'),
|
||||
secretKey: strapi.config.studio.secretKey,
|
||||
dashboardToken: strapi.config.dashboard.token,
|
||||
token: strapi.token,
|
||||
env: strapi.config.environment
|
||||
};
|
||||
const object = {
|
||||
appId: strapi.config.studio.appId,
|
||||
appName: strapi.config.name,
|
||||
publicKey: strapi.rsa.exportKey('private'),
|
||||
secretKey: strapi.config.studio.secretKey,
|
||||
dashboardToken: strapi.config.dashboard.token,
|
||||
token: strapi.token,
|
||||
env: strapi.config.environment
|
||||
};
|
||||
|
||||
socket.emit('check', key.encrypt(object));
|
||||
}
|
||||
socket.emit('check', key.encrypt(object));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user