Showing
1 changed file
with
5 additions
and
3 deletions
... | ... | @@ -64,11 +64,13 @@ export const useUtils = () => { |
64 | 64 | const pathUrl = window.location.host; |
65 | 65 | const protocol = window.location.protocol; |
66 | 66 | let url = ''; |
67 | - if (method === '2') { | |
67 | + if (method === RequestMethodTypeEnum.WEBSOCKET) { | |
68 | 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 | 74 | if (type === 'server_url') { |
73 | 75 | url = `${protocol}//${pathUrl}`; |
74 | 76 | } | ... | ... |