mirror of https://github.com/calzoneman/sync.git
Minor function change
This commit is contained in:
parent
40e2a608f6
commit
7b5476874d
|
@ -5,7 +5,11 @@ export default class NullClusterClient {
|
||||||
this.ioConfig = ioConfig;
|
this.ioConfig = ioConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
getSocketURL(channel) {
|
getSocketConfig(channel) {
|
||||||
return Promise.resolve(this.ioConfig.getSocketURL());
|
const url = this.ioConfig.getSocketURL();
|
||||||
|
return Promise.resolve({
|
||||||
|
url: url,
|
||||||
|
secure: /^(https|wss)/.test(url)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,8 @@ export default function initialize(app) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
clusterClient.getSocketURL(req.params.channel).then(url => {
|
clusterClient.getSocketConfig(req.params.channel).then(config => {
|
||||||
res.json({
|
res.json(config);
|
||||||
url,
|
|
||||||
secure: /^(https|wss)/.test(url)
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1111,7 +1111,6 @@ setupCallbacks = function() {
|
||||||
|
|
||||||
$.getJSON("/socketconfig/" + CHANNEL.name + ".json")
|
$.getJSON("/socketconfig/" + CHANNEL.name + ".json")
|
||||||
.done(function (socketConfig) {
|
.done(function (socketConfig) {
|
||||||
console.log(socketConfig);
|
|
||||||
if (socketConfig.error) {
|
if (socketConfig.error) {
|
||||||
makeAlert("Socket.io configuration returned error: " +
|
makeAlert("Socket.io configuration returned error: " +
|
||||||
socketConfig.error, "alert-danger")
|
socketConfig.error, "alert-danger")
|
||||||
|
|
Loading…
Reference in New Issue