Skip to content

Commit 2631785

Browse files
committed
fix api for reassigning user
1 parent 216a49e commit 2631785

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib/common/apiFunctions.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,17 @@
471471
let headscaleAPIKey = localStorage.getItem('headscaleAPIKey') || '';
472472
473473
// endpoint url for editing users
474-
let endpointURL = `/api/v1/node/${deviceID}/user?user=${user}`;
474+
let endpointURL = `/api/v1/node/${deviceID}/user`;
475475
476476
await fetch(headscaleURL + endpointURL, {
477477
method: 'POST',
478478
headers: {
479479
Accept: 'application/json',
480480
Authorization: `Bearer ${headscaleAPIKey}`
481-
}
481+
},
482+
body: JSON.stringify({
483+
user: user
484+
})
482485
})
483486
.then((response) => {
484487
if (response.ok) {

0 commit comments

Comments
 (0)