fix api for reassigning user

This commit is contained in:
Chris Bisset 2025-03-13 22:21:18 +00:00
parent 216a49ec52
commit 2631785f9f

View file

@ -471,14 +471,17 @@
let headscaleAPIKey = localStorage.getItem('headscaleAPIKey') || '';
// endpoint url for editing users
let endpointURL = `/api/v1/node/${deviceID}/user?user=${user}`;
let endpointURL = `/api/v1/node/${deviceID}/user`;
await fetch(headscaleURL + endpointURL, {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: `Bearer ${headscaleAPIKey}`
}
},
body: JSON.stringify({
user: user
})
})
.then((response) => {
if (response.ok) {