API lib cleanup, 404 hosts WIP

This commit is contained in:
Jamie Curnow committed 2025-10-02 08:12:36 +10:00
1 parent 058f49ceea
commit 54e036276a
76 files changed
+921 -544

No files matched your search

+5 -13
View File
@@ -1,12 +1,7 @@
import * as api from "./base";
import type { User } from "./models";
export async function updateAuth(
userId: number | "me",
newPassword: string,
current?: string,
abortController?: AbortController,
): Promise<User> {
export async function updateAuth(userId: number | "me", newPassword: string, current?: string): Promise<User> {
const data = {
type: "password",
current: current,
@@ -16,11 +11,8 @@ export async function updateAuth(
data.current = current;
}
return await api.put(
{
url: `/users/${userId}/auth`,
data,
},
abortController,
);
return await api.put({
url: `/users/${userId}/auth`,
data,
});
}