mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-04 11:50:09 +00:00
15 lines
386 B
TypeScript
15 lines
386 B
TypeScript
import * as api from "./base";
|
|
import type { UserExpansion } from "./expansions";
|
|
import type { User } from "./models";
|
|
|
|
export async function getUser(id: number | string = "me", expand?: UserExpansion[], params = {}): Promise<User> {
|
|
const userId = id ? id : "me";
|
|
return await api.get({
|
|
url: `/users/${userId}`,
|
|
params: {
|
|
expand: expand?.join(","),
|
|
...params,
|
|
},
|
|
});
|
|
}
|