From 2631785f9ffab7912c2bc848cf8a67d779bfe920 Mon Sep 17 00:00:00 2001 From: Chris Bisset Date: Thu, 13 Mar 2025 22:21:18 +0000 Subject: [PATCH] fix api for reassigning user --- src/lib/common/apiFunctions.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/common/apiFunctions.svelte b/src/lib/common/apiFunctions.svelte index 0a896ba..bbaa328 100644 --- a/src/lib/common/apiFunctions.svelte +++ b/src/lib/common/apiFunctions.svelte @@ -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) {