mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-26 19:24:12 +08:00
fix: //
in websocketpath (#651)
This commit is contained in:
parent
d148c1941e
commit
ed70948a36
@ -2,6 +2,7 @@ import { createEventSignal } from '@solid-primitives/event-listener'
|
||||
import { makePersisted } from '@solid-primitives/storage'
|
||||
import { createReconnectingWS } from '@solid-primitives/websocket'
|
||||
import ky from 'ky'
|
||||
import _ from 'lodash'
|
||||
import { createMemo, createSignal } from 'solid-js'
|
||||
|
||||
export const [selectedEndpoint, setSelectedEndpoint] = makePersisted(
|
||||
@ -48,7 +49,7 @@ export const endpoint = () =>
|
||||
export const secret = () => endpoint()?.secret
|
||||
|
||||
export const wsEndpointURL = () =>
|
||||
new URL(endpoint()?.url ?? '').href.replace('http', 'ws')
|
||||
_.trimEnd(new URL(endpoint()?.url ?? '').href.replace('http', 'ws'), '/')
|
||||
|
||||
export const useWsRequest = <T>(
|
||||
path: string,
|
||||
|
Loading…
x
Reference in New Issue
Block a user