API lib cleanup, 404 hosts WIP

This commit is contained in:
Jamie Curnow committed 2025-10-02 08:12:36 +10:00
1 parent 058f49ceea
commit 54e036276a
76 files changed
+921 -544

No files matched your search

+5 -15
View File
@@ -1,19 +1,9 @@
import * as api from "./base";
import type { TokenResponse } from "./responseTypes";
interface Options {
payload: {
identity: string;
secret: string;
};
}
export async function getToken({ payload }: Options, abortController?: AbortController): Promise<TokenResponse> {
return await api.post(
{
url: "/tokens",
data: payload,
},
abortController,
);
export async function getToken(identity: string, secret: string): Promise<TokenResponse> {
return await api.post({
url: "/tokens",
data: { identity, secret },
});
}