get ws addr

This commit is contained in:
zqn
2021-01-07 18:37:22 +08:00
parent da3e6aabe2
commit 6798e7b093
3 changed files with 19 additions and 0 deletions

View File

@@ -64,6 +64,17 @@ class ExampleController extends BaseController {
self.sendData(uploadRes);
}
async getWsUrl() {
const self = this;
const { service } = this;
const data = {};
const addr = await service.socket.getWsUrl();
data.url = addr;
self.sendSuccess(data);
}
}
module.exports = ExampleController;