mirror of
https://github.com/gurucomputing/headscale-ui.git
synced 2026-01-23 02:34:43 +00:00
fix api for reassigning user
This commit is contained in:
parent
216a49ec52
commit
2631785f9f
1 changed files with 5 additions and 2 deletions
|
|
@ -471,14 +471,17 @@
|
||||||
let headscaleAPIKey = localStorage.getItem('headscaleAPIKey') || '';
|
let headscaleAPIKey = localStorage.getItem('headscaleAPIKey') || '';
|
||||||
|
|
||||||
// endpoint url for editing users
|
// 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, {
|
await fetch(headscaleURL + endpointURL, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/json',
|
Accept: 'application/json',
|
||||||
Authorization: `Bearer ${headscaleAPIKey}`
|
Authorization: `Bearer ${headscaleAPIKey}`
|
||||||
}
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
user: user
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue