支持有路径的后端地址 (#649)

This commit is contained in:
师哥 2024-04-02 23:02:03 +08:00 committed by GitHub
parent c78f58783f
commit d148c1941e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,7 +48,7 @@ export const endpoint = () =>
export const secret = () => endpoint()?.secret export const secret = () => endpoint()?.secret
export const wsEndpointURL = () => export const wsEndpointURL = () =>
new URL(endpoint()?.url ?? '').origin.replace('http', 'ws') new URL(endpoint()?.url ?? '').href.replace('http', 'ws')
export const useWsRequest = <T>( export const useWsRequest = <T>(
path: string, path: string,