mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
use common vars in router, minor clean up (#551)
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
336daea333
commit
d90be46a1f
4 files changed
+53
-35
No files matched your search
@@ -50,7 +50,6 @@ export class TerminalApi extends WebSocketApi {
|
||||
async getUrl(token: string) {
|
||||
const { hostname, protocol } = location;
|
||||
let { port } = location;
|
||||
const prefix = apiPrefix.TERMINAL;
|
||||
const { id, node } = this.options;
|
||||
const wss = `ws${protocol === "https:" ? "s" : ""}://`;
|
||||
const queryParams = { token, id };
|
||||
@@ -63,7 +62,7 @@ export class TerminalApi extends WebSocketApi {
|
||||
type: "node"
|
||||
});
|
||||
}
|
||||
return `${wss}${hostname}${port}${prefix}/api?${stringify(queryParams)}`;
|
||||
return `${wss}${hostname}${port}/api?${stringify(queryParams)}`;
|
||||
}
|
||||
|
||||
async connect() {
|
||||
|
||||
Reference in new issue
Block a user