mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-02-02 17:02:53 +00:00
API lib cleanup, 404 hosts WIP
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import * as api from "./base";
|
||||
import type { ProxyHostExpansion } from "./expansions";
|
||||
import type { ProxyHost } from "./models";
|
||||
|
||||
export async function getProxyHost(id: number, abortController?: AbortController): Promise<ProxyHost> {
|
||||
return await api.get(
|
||||
{
|
||||
url: `/nginx/proxy-hosts/${id}`,
|
||||
export async function getProxyHost(id: number, expand?: ProxyHostExpansion[], params = {}): Promise<ProxyHost> {
|
||||
return await api.get({
|
||||
url: `/nginx/proxy-hosts/${id}`,
|
||||
params: {
|
||||
expand: expand?.join(","),
|
||||
...params,
|
||||
},
|
||||
abortController,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user