Move protocol version to a constant, and reorganise constants a bit

This commit is contained in:
Schuyler Cebulskie
2016-09-30 02:45:16 -04:00
parent cda31dd224
commit 543e814f8e
3 changed files with 24 additions and 26 deletions

View File

@@ -40,7 +40,7 @@ class RESTMethods {
return new Promise((resolve, reject) => {
this.rest.makeRequest('get', Constants.Endpoints.gateway, true)
.then(res => {
this.rest.client.ws.gateway = `${res.url}/?encoding=json&v=${this.rest.client.options.protocolVersion}`;
this.rest.client.ws.gateway = `${res.url}/?encoding=json&v=${Constants.PROTOCOL_VERSION}`;
resolve(this.rest.client.ws.gateway);
})
.catch(reject);