mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-21 11:30:11 +00:00
API lib cleanup, 404 hosts WIP
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user