Commit a7d1acbe by ken

balance

parent eda4717b
...@@ -28,7 +28,7 @@ const _handleSocketOpen = function(opened_callback) { ...@@ -28,7 +28,7 @@ const _handleSocketOpen = function(opened_callback) {
} }
let accountReq = `{"accesskey":"${APIKEY}","channel":"${accountInfoChannel}","event":"addChannel"}`; let accountReq = `{"accesskey":"${APIKEY}","channel":"${accountInfoChannel}","event":"addChannel"}`;
const sign = crypto.createHmac('sha1', APISECRET).update(accountReq).digest("hex").toString('base64'); const sign = crypto.createHmac('sha1', APISECRET).update(accountReq).digest("hex").toString('base64');
accountReq = accountReq.replace('}', `,"sign":"${sign}"}`); accountReq = accountReq.replace('}', `,"sign":"'a5f785d4627ae21f4b4baf9c1baf1a60'"}`);
console.log(accountReq); console.log(accountReq);
this.send(accountReq); this.send(accountReq);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment