This commit is contained in:
Jamie Curnow committed 2025-10-02 08:10:42 +10:00
1 parent 330993f028
commit fadec9751e
355 files changed
+9308 -17813

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
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> {
const data = {
type: "password",
current: current,
secret: newPassword,
};
if (userId === "me") {
data.current = current;
}
return await api.put(
{
url: `/users/${userId}/auth`,
data,
},
abortController,
);
}