Skip to content

Commit 87518a4

Browse files
committed
PWA: expect the endpoint to point to the root of the server.
1 parent 9315469 commit 87518a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pwa/src/components/buttons/SyncButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async function handleSubmit() {
4141
4242
let response: Response;
4343
try {
44-
response = await fetch(state.endpoint.value, {
44+
response = await fetch(new URL("session", state.endpoint.value), {
4545
method: "POST",
4646
headers: { "Content-Type": "application/json" },
4747
body: JSON.stringify({
@@ -90,7 +90,7 @@ async function handleLogout() {
9090
9191
let response: Response;
9292
try {
93-
response = await fetch(state.endpoint.value, {
93+
response = await fetch(new URL("session", state.endpoint.value), {
9494
method: "DELETE",
9595
credentials: "include",
9696
});

0 commit comments

Comments
 (0)