API lib cleanup, 404 hosts WIP

This commit is contained in:
Jamie Curnow
2025-09-21 17:16:46 +10:00
parent 058f49ceea
commit 54e036276a
76 changed files with 921 additions and 544 deletions

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 },
});
}