Basis for Upstreams UI

This commit is contained in:
Jamie Curnow committed 2023-01-10 11:50:30 +10:00
1 parent 7ea64c46e9
commit 560f3d9b29
13 files changed
+411

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import * as api from "./base";
import { UpstreamsResponse } from "./responseTypes";
export async function getUpstreams(
offset = 0,
limit = 10,
sort?: string,
filters?: { [key: string]: string },
abortController?: AbortController,
): Promise<UpstreamsResponse> {
const { result } = await api.get(
{
url: "upstreams",
params: { limit, offset, sort, expand: "user", ...filters },
},
abortController,
);
return result;
}