Showing
1 changed file
with
5 additions
and
3 deletions
@@ -64,11 +64,13 @@ export const useUtils = () => { | @@ -64,11 +64,13 @@ export const useUtils = () => { | ||
64 | const pathUrl = window.location.host; | 64 | const pathUrl = window.location.host; |
65 | const protocol = window.location.protocol; | 65 | const protocol = window.location.protocol; |
66 | let url = ''; | 66 | let url = ''; |
67 | - if (method === '2') { | 67 | + if (method === RequestMethodTypeEnum.WEBSOCKET) { |
68 | if (type === 'server_url') { | 68 | if (type === 'server_url') { |
69 | - url = `${protocol === 'http' ? 'ws:' : protocol === 'https' ? 'wss:' : 'ws:'}//${pathUrl}`; | 69 | + url = `${ |
70 | + protocol === 'http:' ? 'ws:' : protocol === 'https:' ? 'wss:' : 'ws:' | ||
71 | + }//${pathUrl}`; | ||
70 | } | 72 | } |
71 | - } else if (method === '0') { | 73 | + } else if (method === RequestMethodTypeEnum.COMMOM) { |
72 | if (type === 'server_url') { | 74 | if (type === 'server_url') { |
73 | url = `${protocol}//${pathUrl}`; | 75 | url = `${protocol}//${pathUrl}`; |
74 | } | 76 | } |