improved /user/update

This commit is contained in:
Oliver Bryan
2026-01-01 04:51:46 +00:00
parent 866796b5de
commit a5f18b5995
3 changed files with 9 additions and 7 deletions

View File

@@ -5,20 +5,17 @@ export async function update({
id,
name,
password,
serverURL,
onSuccess,
onError,
}: {
id: number;
name: string;
password: string;
serverURL: string;
} & ServerQueryInput) {
const url = new URL(`${getServerURL()}/user/update`);
url.searchParams.set("id", `${id}`);
url.searchParams.set("name", name.trim());
url.searchParams.set("password", password.trim());
url.searchParams.set("serverURL", serverURL.trim());
const res = await fetch(url.toString(), {
headers: getAuthHeaders(),