Replace http(s) by ws for websockets
This commit is contained in:
parent
7de2f33b30
commit
3d2ddbd695
@ -40,7 +40,7 @@ export const registerRequest = (data: {
|
||||
export const refreshRequest = (token: string) => {
|
||||
return axios
|
||||
.request({
|
||||
url: `${env.PUBLIC_API_BASE}/refresh`,
|
||||
url: `${env.PUBLIC_API_BASE}refresh`,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
|
@ -27,7 +27,7 @@
|
||||
const room = writable<Room | null>(null);
|
||||
const member = writable<Member | null>(null);
|
||||
const parcours = writable<ParcoursRead | null>(null);
|
||||
const ws = connect(`${env.PUBLIC_API_BASE}api/ws/room/${$page.params.slug}`);
|
||||
const ws = connect(`${env.PUBLIC_API_BASE.replace("https", "ws").replace('http', "ws")}ws/room/${$page.params.slug}`);
|
||||
|
||||
setContext("room", room);
|
||||
setContext("member", member);
|
||||
|
Loading…
Reference in New Issue
Block a user