chore: websocket connection string queries type definition

This commit is contained in:
kunish 2023-09-17 15:41:20 +08:00
parent c6eceb3dcd
commit 3e4078d99e
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -52,7 +52,7 @@ export const wsEndpointURL = () =>
export const useWsRequest = <T>( export const useWsRequest = <T>(
path: string, path: string,
queries: Record<string, unknown> = {}, queries: Record<string, string> = {},
) => { ) => {
const queryParams = new URLSearchParams(queries) const queryParams = new URLSearchParams(queries)
queryParams.set('token', secret() ?? '') queryParams.set('token', secret() ?? '')